aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohannes Sixt <j6t@kdbg.org>2008-12-03 13:43:20 +0100
committerPaul Mackerras <paulus@samba.org>2008-12-22 10:16:17 +1100
commitda12e59dd6732f2f6dfe6285193dbebe9cd5a91b (patch)
tree2ccb3c995628433e00d221bc97dca5e0a4f48b88
parentadcbec13b9bbcb5e4a15de403038ff91d55b7ece (diff)
downloadgit-da12e59dd6732f2f6dfe6285193dbebe9cd5a91b.tar.gz
git-da12e59dd6732f2f6dfe6285193dbebe9cd5a91b.tar.xz
gitk: Ensure that "Reset branch" menu entry is enabled
Consider this sequence of events: 1. Detach HEAD and fire up gitk 2. Call the context menu on some commit. Notice that the last menu entry says "Detached HEAD: can't reset" and it is disabled. 3. Now checkout some regular branch (e.g. 'master') using the context menu. 4. Call the context menu again on some commit. Previously, at this point the last menu entry said "Reset master branch to here", but it was still disabled. With this fix it is now enabled again. Signed-off-by: Johannes Sixt <j6t@kdbg.org> Signed-off-by: Paul Mackerras <paulus@samba.org>
-rwxr-xr-xgitk2
1 files changed, 1 insertions, 1 deletions
diff --git a/gitk b/gitk
index acda29571..2feb667d5 100755
--- a/gitk
+++ b/gitk
@@ -7979,7 +7979,7 @@ proc rowmenu {x y id} {
if {$id ne $nullid && $id ne $nullid2} {
set menu $rowctxmenu
if {$mainhead ne {}} {
- $menu entryconfigure 7 -label [mc "Reset %s branch to here" $mainhead]
+ $menu entryconfigure 7 -label [mc "Reset %s branch to here" $mainhead] -state normal
} else {
$menu entryconfigure 7 -label [mc "Detached head: can't reset" $mainhead] -state disabled
}