Repository navigation
feat(branch): compare two branches without checking either out - #35
Merged
Merged
Conversation
`diffs branch BASE HEAD` reviews HEAD against BASE (like `git diff BASE...HEAD`) without HEAD being the checked-out branch. - git::branch_diff takes an optional head ref; --include-dirty conflicts with it (CLI) and is a 400 from /api/branch-diff. - /api/blob accepts rev=<ref> with path, so pure renames load from the reviewed branch instead of the working tree. - Local comments accept an optional branch scope (?branch=), so threads on a non-checked-out branch are filed under it. - Web forwards ?head= and keeps it when switching base.
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
diffs branch BASE HEADreviewsHEADagainstBASE(same asgit diff BASE...HEAD) without either branch being checked out; omittingHEADkeeps today's behaviorgit::branch_difftakes an optional head ref;--include-dirtyconflicts with it (clap) and is a 400 from/api/branch-diff, since uncommitted changes only make sense for the checked-out branchunknown head ref: <name>)/api/blobacceptsrev=<ref>withpath, so pure renames (no blob oids) load from the reviewed branch instead of the working tree?branch=scope, so threads on a non-checked-out branch are filed under it;diffs commentsis unchanged (Nonescope)?head=, shows it in the title/branch chip/export, and keeps it when switching baseMuch of the
comments.rsdiff iscargo fmtre-wrapping existing call sites that now take a scope argument.Test plan
cargo test,cargo clippy --all-targets -D warnings,cargo fmttsc,oxlint,oxfmt,vite buildbranch_diff(main, Some(feature))vsgit diff main...featurewith a third dirty branch checked out;DirtyWithHeaderror;read_rev_file; explicit comment scope; comment scope query validation; CLI target/label encodingfeature, head+dirty returns 400, comment filed underfeature