git-gui: always default to the last merged branch in remote delete
This is useful if you are directly working together with other developers pushing feature branches on a shared remote. You typically push feature branches to the remote so others can review. Once they are satisfied and the branch is merged into the main branch it needs to be deleted on the server. Since we did not yet have a preselected default branch in the remote delete dialog lets use the last merged branch if it is found on the server. Signed-off-by: Heiko Voigt <hvoigt@hvoigt.net> Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
This commit is contained in:
@ -251,7 +251,7 @@ method _write_url {args} { set urltype url }
|
||||
method _write_check_head {args} { set checktype head }
|
||||
|
||||
method _write_head_list {args} {
|
||||
global current_branch
|
||||
global current_branch _last_merged_branch
|
||||
|
||||
$head_m delete 0 end
|
||||
foreach abr $head_list {
|
||||
@ -267,6 +267,13 @@ method _write_head_list {args} {
|
||||
set check_head $current_branch
|
||||
}
|
||||
}
|
||||
set lmb [lsearch -exact -sorted $head_list $_last_merged_branch]
|
||||
if {$lmb >= 0} {
|
||||
$w.heads.l conf -state normal
|
||||
$w.heads.l select set $lmb
|
||||
$w.heads.l yview $lmb
|
||||
$w.heads.l conf -state disabled
|
||||
}
|
||||
}
|
||||
|
||||
method _write_urltype {args} {
|
||||
|
Reference in New Issue
Block a user