fix(cli): accept hunk diff A B as the two-commit range A..B - #678
Open
HackAttack wants to merge 2 commits into
Open
fix(cli): accept hunk diff A B as the two-commit range A..B#678HackAttack wants to merge 2 commits into
hunk diff A B as the two-commit range A..B#678HackAttack wants to merge 2 commits into
Conversation
Contributor
|
PR author is not in the allowed authors list. |
|
@HackAttack is attempting to deploy a commit to the Modem Team on Vercel. A member of the Team first needs to authorize it. |
benvinegar
requested changes
Aug 8, 2026
This was referenced Aug 8, 2026
HackAttack
force-pushed
the
fix/diff-two-commit-args
branch
from
August 9, 2026 15:28
0d5f7e0 to
a0f42b1
Compare
Git treats `diff A B` and `diff A..B` as the same two-commit review, but Hunk only understood the dotted spelling: a second positional was always folded into pathspecs, so `hunk diff main feature` silently reviewed `main` limited to a pathspec named `feature`. Two positionals now normalize to `A..B`, except where the old reading is the intended one: a first target that already spells a range, or a second token that exists on disk, which is what `diff <rev> <path>` without a `--` separator relies on. Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
HackAttack
force-pushed
the
fix/diff-two-commit-args
branch
from
August 9, 2026 15:45
a0f42b1 to
1121005
Compare
`hunk diff A B` normalized to the Git range `A..B` while parsing, before VCS detection. jj and Sapling read `..` as a revset over the commits between the endpoints, so a diverged from-side contributed nothing and its changes never appeared as removals. Verified against jj 0.44: `jj diff -r a..b` omits a deletion that `jj diff --from a --to b` reports. The endpoints now travel unjoined as `rangeEndpoints`, and each adapter names them in its own syntax: Git `A..B`, jj `--from`/`--to`, Sapling a `-r` per side. Parsing also stopped asking the filesystem whether a token is a revision or a pathspec. That answer moved with the working directory, and it read deleted files and globs as revisions. Two positionals are two commits; a pathspec needs `--`, unless a side already spells a range or there are more positionals than a commit pair can hold. Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
HackAttack
force-pushed
the
fix/diff-two-commit-args
branch
from
August 9, 2026 15:48
1121005 to
0ce9385
Compare
Contributor
Author
|
Both true, fixed! |
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.
Git treats
diff A Banddiff A..Bas the same two-commit review, but Hunk only understood the dotted spelling: a second positional was always folded into pathspecs, sohunk diff main featuresilently reviewedmainlimited to a pathspec namedfeature.Two positionals now normalize to
A..B, except where the old reading is the intended one: a first target that already spells a range, or a second token that exists on disk, which is whatdiff <rev> <path>without a--separator relies on.