summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLibravatar Shawn O. Pearce <spearce@spearce.org>2007-02-26 11:22:10 -0500
committerLibravatar Shawn O. Pearce <spearce@spearce.org>2007-02-26 11:22:10 -0500
commitfd234dfdb7ee1955922ded27ed18df59259193d9 (patch)
tree107b144e7807daeea119251ee47203d8067d0fbf
parentgit-gui: Relocate the menu/transport menu code. (diff)
downloadtgif-fd234dfdb7ee1955922ded27ed18df59259193d9.tar.xz
git-gui: Add Reset to the Branch menu.
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>
-rwxr-xr-xgit-gui.sh6
1 files changed, 6 insertions, 0 deletions
diff --git a/git-gui.sh b/git-gui.sh
index 48097ea5e8..36155bb8ea 100755
--- a/git-gui.sh
+++ b/git-gui.sh
@@ -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