Repository navigation
fix: select diffs from the merge-base; the push hook keeps the exact range (#112) - #152
Merged
Merged
Conversation
`base..head` compared two trees, so on a branch behind main the changes that landed on main since the fork were seeded as the branch's own: a docs-only branch listed every journey because main had added a migration (and since #117 any unmodeled file on main does that). select now diffs merge-base(base, head)..head. When base is an ancestor of head (HEAD~1, every push) that is base itself, so nothing changes. With no common ancestor it falls back to the tree diff and warns. The result carries `diff_base` when it differs from base, and the text says so. Docs, the MCP description and the verify skill follow.
…empty diff (#112 review) - The pre-push hook moves the remote from its old tip to the new one; after a rebase or rewind the merge-base hid what the push removes (a dropped migration read as a confident NONE). hook.run now calls select(exact_range=True), and its `full:` command carries --exact-range (new select flag). - head an ancestor of base made the merge-base head itself, an empty diff by construction: fall back to the tree diff with a warning. - Only `git merge-base` exit 1 means "no common ancestor"; anything else raises instead of being mislabelled as unrelated histories. - _same_rev replaced by ledger.resolve_commit.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #112.
select --base main --head HEADnow diffs frommerge-base(base, head), so changes that landed on main since the branch forked are no longer seeded as the branch's own. A docs-only branch behind a main that had added a migration used to list every journey. The result carriesdiff_basewhen it differs frombase.exact_range=True,--exact-rangein itsfull:command). A push moves the remote from its old tip to the new one, and after a rebase or rewind the fork point would hide what the push removes.git merge-baseexit 1), fall back to the tree diff with a warning. Any other merge-base failure raises.Reviewed by /code-review and a code-reviewer agent. Both under-selection findings (a rewind or force-push, and head behind base) are fixed in e8337fb; the rest are filed as #151.