Skip to content

git_mf: Skip submodules without TARGET under --subs - #143

Merged
Unique-Divine merged 4 commits into
mainfrom
ud/git-mf-subs-skip
Nov 15, 2026
Merged

Unique-Divine merged 4 commits into
mainfrom
ud/git-mf-subs-skip

Conversation

@Unique-Divine

Copy link
Copy Markdown
Owner

Follow-up to dotfiles#142 for boku#201.

On homebox, git_mf ud/main --subs in boku stopped at the commonplace submodule (Unique-Divine/Commonplace-Book). It has no machine branches, so it reported plan: missing-target.

Under --subs, a submodule is now skipped, with a message, when TARGET is missing locally and git ls-remote --exit-code --heads origin TARGET reports it missing (exit 2). Any other ls-remote failure, such as no network, stops the run before anything changes. Skipped submodules stay out of the pointer checks, and git merges their pointers as usual.

Tests: bun test bin/git_mf.test.ts, 56 pass, including "a submodule without TARGET is skipped".

On homebox, boku's commonplace submodule has no ud/main branch, so git_mf ud/main --subs stopped with missing-target. Skip a submodule when TARGET is missing locally and git ls-remote reports it missing on origin (exit 2); other ls-remote failures still stop the run. Refs Unique-Divine/boku#201.
@Unique-Divine Unique-Divine added the A-tech-investment Area: Internal work that helps the team ship faster label Nov 15, 2026
Query refs/heads/TARGET so a branch such as x/ud/main does not count as ud/main. A skipped submodule with uncommitted changes refuses the run, and a skipped submodule whose recorded pointer moved gets a git submodule update reminder. Found by an independent Codex review.
Record each skipped submodule's pointer before the run and print the git submodule update reminder only when the merge changed it and the checkout was in sync. A dirty skipped submodule says it needs manual handling. Tests assert the dry-run exit code and the dirty refusal. Found by an independent Codex review.
…skip run

Found by an independent Codex review.
@Unique-Divine
Unique-Divine merged commit 2ffc6f3 into main Nov 15, 2026
10 checks passed
@Unique-Divine
Unique-Divine deleted the ud/git-mf-subs-skip branch November 15, 2026 23:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-tech-investment Area: Internal work that helps the team ship faster

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant