Skip to content

Commit c0d1532

Browse files
hvoigtspearce
authored andcommitted
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 <[email protected]> Signed-off-by: Shawn O. Pearce <[email protected]>
1 parent acb9108 commit c0d1532

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

lib/remote_branch_delete.tcl

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -250,6 +250,8 @@ method _write_url {args} { set urltype url }
250250
method _write_check_head {args} { set checktype head }
251251

252252
method _write_head_list {args} {
253+
global current_branch
254+
253255
$head_m delete 0 end
254256
foreach abr $head_list {
255257
$head_m insert end radiobutton \
@@ -258,7 +260,11 @@ method _write_head_list {args} {
258260
-variable @check_head
259261
}
260262
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+
}
262268
}
263269
}
264270

0 commit comments

Comments
 (0)