Skip to content

Commit

Permalink
git-gui: Add Reset to the Branch menu.
Browse files Browse the repository at this point in the history
cehteh on #git noticed that there was no way to perform a reset --hard
from within git-gui.  When I pointed out this was Merge->Abort Merge
cehteh said this is not very understandable, and that most users would
never guess to try that option unless they were actually in a merge.

So Branch->Reset is now also a way to cause a reset --hard from within
the UI.  Right now the confirmation dialog is the same as the one used
in Merge->Abort Merge.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
  • Loading branch information
Shawn O. Pearce committed Feb 26, 2007
1 parent 9b28a8b commit fd234df
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions git-gui.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5256,6 +5256,12 @@ if {[is_enabled branch]} {
-font font_ui
lappend disable_on_lock [list .mbar.branch entryconf \
[.mbar.branch index last] -state]

.mbar.branch add command -label {Reset...} \
-command do_reset_hard \
-font font_ui
lappend disable_on_lock [list .mbar.branch entryconf \
[.mbar.branch index last] -state]
}

# -- Commit Menu
Expand Down

0 comments on commit fd234df

Please sign in to comment.