@matheusbsbs / matheus-bagliano / commits / c0d153295c
Fork 0

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

We already do the same when locally deleting a branch. Signed-off-by: Heiko Voigt <hvoigt@hvoigt.net> Signed-off-by: Shawn O. Pearce <spearce@spearce.org>

Heiko Voigt committed Dec 4, 2009 at 22:26 UTC c0d153295c6f9140e644aa740f588257aac1f825
1 file changed +7 -1
lib/remote_branch_delete.tcl
+7 -1
@@ -250,6 +250,8 @@ method _write_url {args} { set urltype url }
250 method _write_check_head {args} { set checktype head }
251
252 method _write_head_list {args} {
253 + global current_branch
254 +
255 $head_m delete 0 end
256 foreach abr $head_list {
257 $head_m insert end radiobutton \
@@ -258,7 +260,11 @@ method _write_head_list {args} {
260 -variable @check_head
261 }
262 if {[lsearch -exact -sorted $head_list $check_head] < 0} {
261 - set check_head {}
263 + if {[lsearch -exact -sorted $head_list $current_branch] < 0} {
264 + set check_head {}
265 + } else {
266 + set check_head $current_branch
267 + }
268 }
269 }
270