diff options
Diffstat (limited to 'git-gui/lib/branch_rename.tcl')
-rw-r--r-- | git-gui/lib/branch_rename.tcl | 14 |
1 files changed, 3 insertions, 11 deletions
diff --git a/git-gui/lib/branch_rename.tcl b/git-gui/lib/branch_rename.tcl index 405101637f..1cadc31d20 100644 --- a/git-gui/lib/branch_rename.tcl +++ b/git-gui/lib/branch_rename.tcl @@ -8,7 +8,7 @@ field oldname field newname constructor dialog {} { - global all_heads current_branch + global current_branch make_toplevel top w wm title $top "[appname] ([reponame]): Rename Branch" @@ -34,7 +34,7 @@ constructor dialog {} { frame $w.rename label $w.rename.oldname_l -text {Branch:} - eval tk_optionMenu $w.rename.oldname_m @oldname $all_heads + eval tk_optionMenu $w.rename.oldname_m @oldname [load_all_heads] label $w.rename.newname_l -text {New Name:} entry $w.rename.newname_t \ @@ -64,7 +64,7 @@ constructor dialog {} { } method _rename {} { - global all_heads current_branch + global current_branch if {$oldname eq {}} { tk_messageBox \ @@ -118,14 +118,6 @@ method _rename {} { return } - set oldidx [lsearch -exact -sorted $all_heads $oldname] - if {$oldidx >= 0} { - set all_heads [lreplace $all_heads $oldidx $oldidx] - } - lappend all_heads $newname - set all_heads [lsort $all_heads] - populate_branch_menu - if {$current_branch eq $oldname} { set current_branch $newname } |