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:
@ -83,6 +83,7 @@ method _visualize {} {
|
||||
|
||||
method _start {} {
|
||||
global HEAD current_branch remote_url
|
||||
global _last_merged_branch
|
||||
|
||||
set name [_rev $this]
|
||||
if {$name eq {}} {
|
||||
@ -109,6 +110,7 @@ method _start {} {
|
||||
regsub ^refs/heads/ $branch {} branch
|
||||
puts $fh "$cmit\t\tbranch '$branch' of $remote"
|
||||
close $fh
|
||||
set _last_merged_branch $branch
|
||||
|
||||
set cmd [list git]
|
||||
lappend cmd merge
|
||||
|
Reference in New Issue
Block a user