Conversation
The Commits panel is about to offer deleting a branch that points at the selected commit, and it should present exactly the same local / remote / both choice as the Branches panel does. Keeping the menu in BranchesController would force the Commits panel to duplicate it, so move it next to the confirmation helpers it calls. Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
The Commits panel is about to get a second menu that lists the branches pointing at the selected commit, with the same 1-9 keys and the same disabled placeholder when there are none. Pull that part out so both menus share it instead of copying it. Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
The two halves are about to be needed separately: once `d` opens a menu, the reasons that apply outside a rebase belong on the menu's drop entry rather than on the keybinding, while the todo checks stay on the keybinding because there is no menu mid-rebase. Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
With git.log.showWholeGraph on, or in a stacked-branches workflow, the Commits panel shows branch heads other than the checked-out branch, but pruning one means finding it again in the Branches panel. Let the graph be pruned where it is visible. This is the panel's second delete operation, so both go behind `d`: the drop confirmation becomes a menu whose first entry drops the commit (still `d` and enter), followed by one entry per branch at the selected commit(s), plus a "Delete branches" entry for all of them when there is more than one. Those open the Branches panel's delete menu, which already handles branches without an upstream. The checked-out branch is not offered, since it can't be deleted anyway. The merge-commit warning moves to the drop entry's tooltip. A range of selected commits contributes all branches pointing at any of them, the way a range in the Branches panel does. The reasons that used to disable `d` outside a rebase (a merge commit in the range, a running cherry-pick or revert) now sit on the drop entry instead, so that branch deletion stays reachable in those states. Mid-rebase `d` still edits the todo directly, without a menu. The clipboard test used the drop confirmation as a stand-in for "any confirmation popup"; since that confirmation no longer exists, it uses the stash drop confirmation instead. The copy-to-clipboard behaviour under test is unchanged. Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
seflue
force-pushed
the
delete-branch-from-commits-panel
branch
from
September 24, 2026 18:36
32db251 to
09a7fdd
Compare
This branch has not been deployed
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.
PR Description
Back to #4115 after a longer pause than planned. #4117 covered switching branches from the Commits pane,; this one continues with deleting them.
Pressing
don a commit now opens a menu instead of the "Drop commit" confirmation. The menu replaces the confirmation, as you suggested back then. The first entry drops the commit as before (stilld, enter), followed by one entry per local branch pointing at the selected commit, and a "Delete branches" entry for all of them when there are several. Each opens the Branches panel's delete menu. The checked-out branch isn't offered since it can't be deleted anyway. When it is the only branch in the selection, the menu shows a disabled entry saying why, like the checkout menu from #4117.A range of commits treats all branches found in the selection as a set. Handling this set works like a selection in the Branches panel.
dis now also available while a cherry-pick or revert is in progress, and on a range that contains a merge commit. Since the commit(s) can't be dropped in those situations, the drop entry shows up disabled with the reason as its tooltip, as disabled entries do in the other menus. During a rebase,dstill edits the todo without a menu. The warning about dropping merge commits moved into the tooltip of the drop entry.The clipboard test used the drop confirmation as its stand-in for "any confirmation". Because that one is replaced by the menu, the test uses the stash drop confirmation now.
Please check if the PR fulfills these requirements
go generate ./...)