Skip to contentSkip to conversation

git gui: make current branch default in "remote delete branch" merge check

PATCH RESEND Applied Heiko Voigt 3 participants 3 messages Jun 15, 2016 Library code

lore
Share & tools
lore
#0 lore raw

PATCH RESEND 1/1 git gui: make current branch default in "remote delete branch" merge check

We already do the same when locally deleting a branch.

---

 lib/remote_branch_delete.tcl |    8 +++++++-
 1 files changed, 7 insertions(+), 1 deletions(-)
lib/remote_branch_delete.tcl +7 -1
index 31e0947..2416420 100644
@@ -250,6 +250,8 @@ method _write_url        {args} { set urltype url    }
 method _write_check_head {args} { set checktype head }
 
 method _write_head_list {args} {
+	global current_branch
+
 	$head_m delete 0 end
 	foreach abr $head_list {
 		$head_m insert end radiobutton \
@@ -258,7 +260,11 @@ method _write_head_list {args} {
 			-variable @check_head
 	}
 	if {[lsearch -exact -sorted $head_list $check_head] < 0} {
-		set check_head {}
+		if {[lsearch -exact -sorted $head_list $current_branch] < 0} {
+			set check_head {}
+		} else {
+			set check_head $current_branch
+		}
 	}
 }
 
Signature · 1 line
1.6.4.m4.4
#1 lore raw
Quoted 7 lines · Heiko Voigt

We already do the same when locally deleting a branch.

---

 lib/remote_branch_delete.tcl |    8 +++++++-
 1 files changed, 7 insertions(+), 1 deletions(-)

Thanks, applied.

Signature · 1 line
Shawn.
#2 lore raw
In reply to Heiko Voigt
Quoted 1 line · Heiko Voigt

We already do the same when locally deleting a branch.

+1

This is very useful in a workflow where the reviewer deletes the remote feature branch right after merging and pushing it.

Jens