@matheusbsbs / matheus-bagliano / commits / 3dcdfdf015
Fork 0

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: Shawn O. Pearce <spearce@spearce.org>

Shawn O. Pearce committed Jan 21, 2007 at 04:54 UTC 3dcdfdf015746c7ec10d915705c1a76cc9d9de31
1 file changed +1
git-gui.sh
+1
@@ -1816,6 +1816,7 @@ proc do_delete_branch_action {w} {
1816 set b [$w.list.l get $i]
1817 if {[catch {set o [exec git rev-parse --verify $b]}]} continue
1818 if {$delete_branch_checkhead} {
1819 + if {$b eq $delete_branch_head} continue
1820 if {[catch {set m [exec git merge-base $o $delete_branch_head]}]} continue
1821 if {$o ne $m} {
1822 lappend not_merged $b