feature: add Compare with default base on current branch menu#2322
Open
ivnnv wants to merge 1 commit intosourcegit-scm:developfrom
Open
feature: add Compare with default base on current branch menu#2322ivnnv wants to merge 1 commit intosourcegit-scm:developfrom
ivnnv wants to merge 1 commit intosourcegit-scm:developfrom
Conversation
Other local branches in the sidebar already have a one-click Compare with HEAD entry, but the current branch's right-click only offers the free-form Compare with... palette. Adds a Compare with <default> entry that opens the existing Compare window pre-filled with the repo's default base branch (resolved via refs/remotes/<remote>/HEAD). The remote selection follows the same policy used elsewhere (current branch's upstream remote -> Settings.DefaultRemote -> first remote). The entry is hidden when the remote HEAD is unset or when the resolved base equals the current branch. Adds Commands/QueryDefaultBranch (one symbolic-ref call) and a small resolver in BranchTree.axaml.cs. No changes to Compare, CompareRevisions, or DiffOption.
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.
Other local branches in the sidebar already have a one-click "Compare with HEAD" entry, but the current branch's right-click only offers the free-form "Compare with..." palette. Adds a "Compare with
<default>" entry that opens the existing Compare window pre-filled with the repo's default base branch.The default branch is resolved from
refs/remotes/<remote>/HEAD(the same source GitHub/GitLab use), with the remote chosen via the same fallback order used elsewhere in the app: current branch's upstream remote →Settings.DefaultRemote→ first remote. The entry is hidden when the remote HEAD is unset or when the resolved base equals the current branch (so it never shows "Compare master with master").Test plan
<default>" appears, opens the existing Compare window pre-filled.