Skip to content

feat(graph): Compare With… a branch, tag or SHA from a commit's menu (#123) - #129

Merged
antonarnaudov merged 1 commit into
mainfrom
feat/compare-commit-with
Oct 18, 2026
Merged

antonarnaudov merged 1 commit into
mainfrom
feat/compare-commit-with

Conversation

@antonarnaudov

Copy link
Copy Markdown
Contributor

Closes #123.

  • Right-click any commit in the Commit Graph and choose Compare With… to compare it with a local branch, a remote branch, a tag, or a commit SHA you type.
  • The Compare panel opens on every file that differs between the two, and each file opens as a diff.
  • The panel's own ref pickers offer the same choices.
  • The Compare panel now names commits by their short SHA instead of forty characters.

Tests: unit tests for the ref picker and compare panel plus the l10n catalog check pass locally (verify --fast OK).

🤖 Generated with Claude Code

Right-click any commit in the Commit Graph (panel, editor tab or Commits
rail) and choose Compare With…: a picker lists every local branch, remote
branch (a remote's HEAD pointer left out) and tag, plus "Enter a commit
SHA…". The choice opens the existing Compare panel from the commit to it, in
"All differences" mode: the other side need not contain the commit, and
"what an older tag adds" would be nothing. Files open through the existing
diff routing, so gitstudio.diff.comparisonIn applies.

Refs are picked and compared by their FULL names, so a tag and a branch of
one name stay apart; a typed SHA is resolved with rev-parse --verify
<x>^{commit} (an option-like text never reaches git) and asked again, with
the reason, when it names no commit. The panel's own base/compare pickers
and the palette entry use the same picker.

The panel now names each side the way a person reads it: a short sha, a ref
without refs/heads/ — the tab title, the pills, the summary and the diff
titles used to show forty-character SHAs for Compare These Two Commits.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@antonarnaudov
antonarnaudov merged commit 6210cb7 into main Oct 18, 2026
13 checks passed
@JFingerle

Copy link
Copy Markdown

Awesome, thank you very much!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Compare a commit with branch / tag / SHA

2 participants