feat(cli): compare two revisions explicitly - #938
Merged
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
|
Too many files changed for review (60 files, 50 file limit). Bypass the limit by tagging |
1 task
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.
Summary
hunk diff <from> <to>compare two revisions deterministicallyhunk diff --files <left> <right>formrangeEndpointsthrough extension API generation 14This rebuilds and supersedes #678 on current
main, retaining the original contribution's intent and credit to @HackAttack while integrating with the current VCS extension, session protocol, and workspace safety boundaries.Behavior
hunk diffhunk diff Ahunk diff A Bhunk diff A B -- pathhunk diff --files before.ts after.tsTwo-revision comparisons exclude unrelated working-copy and untracked files. Git uses
A..B, Jujutsu uses--from A --to B, and Sapling uses two-rarguments. Each endpoint is validated independently before backend probes or commands.Before and after by VCS
Git
hunk diffhunk diffhunk diff main→git diff mainhunk diff main..featurehunk diff main featuretreatedfeatureas a pathspechunk diff main feature→git diff main..featurehunk diff main feature -- src/hunk diff before.ts after.ts, guessed from filesystem statehunk diff --files before.ts after.ts, deterministicJujutsu
hunk diffhunk diff '@-'→jj diff -r @-hunk diff A BtreatedBas a filesethunk diff A B→jj diff --from A --to BA..Bis a revset rather than two tree endpoints--from A --to Bhunk diff A B -- src/@endpointhunk diff A @ --watchsnapshots and refreshes working-copy changesSapling
hunk diffhunk diff main→sl diff -r mainhunk diff REVSEThunk diff A BtreatedBas a pathhunk diff A B→sl diff -r A -r Bhunk diff A B -- src/Verification
Automated:
bun run typecheckbun run lintbun run deps:checkbun run check:docsbun run test— 2,127 passed, 3 Sapling-dependent tests skippedbun run test:integration— 139 passed, 1 macOS-only test skippedReal TTY testing in tmux at 120×36 on Linux:
--filesrendered a concrete file pair@endpoint watch mode refreshed after an ordinary filesystem editSapling is not installed on this machine, so executable-backed Sapling tests remain skipped; exact command construction, validation, untracked policy, and adapter-spawn behavior are covered by unit tests.
No visual styling changed, so screenshots are not included.
This PR description was generated by Pi using OpenAI Codex gpt-5.6-sol