summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xgitk6
1 files changed, 5 insertions, 1 deletions
diff --git a/gitk b/gitk
index da685aa63c..9e282e58ec 100755
--- a/gitk
+++ b/gitk
@@ -6016,7 +6016,11 @@ proc rowmenu {x y id} {
}
if {$id ne $nullid && $id ne $nullid2} {
set menu $rowctxmenu
- $menu entryconfigure 7 -label [mc "Reset %s branch to here" $mainhead]
+ if {$mainhead ne {}} {
+ $menu entryconfigure 7 -label [mc "Reset %s branch to here" $mainhead]
+ } else {
+ $menu entryconfigure 7 -label [mc "Detached head: can't reset" $mainhead] -state disabled
+ }
} else {
set menu $fakerowmenu
}