提交 3dcdfdf0 编写于 作者: S Shawn O. Pearce

git-gui: Don't delete the test target branch.

Its possible for the user to select a branch for the merge test
(while deleting branches) and also select that branch for deletion.
Doing so would have bypassed our merge check for that branch, as
a branch is always a strict subset of itself.  So we will simply
skip over a branch and not delete it if that is the branch which
the user selected for the merge check.
Signed-off-by: NShawn O. Pearce <spearce@spearce.org>
上级 4f9d8519
......@@ -1816,6 +1816,7 @@ proc do_delete_branch_action {w} {
set b [$w.list.l get $i]
if {[catch {set o [exec git rev-parse --verify $b]}]} continue
if {$delete_branch_checkhead} {
if {$b eq $delete_branch_head} continue
if {[catch {set m [exec git merge-base $o $delete_branch_head]}]} continue
if {$o ne $m} {
lappend not_merged $b
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册