Skip to content

Commit da12e59

Browse files
j6tpaulusmack
authored andcommitted
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 <[email protected]> Signed-off-by: Paul Mackerras <[email protected]>
1 parent adcbec1 commit da12e59

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

gitk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7979,7 +7979,7 @@ proc rowmenu {x y id} {
79797979
if {$id ne $nullid && $id ne $nullid2} {
79807980
set menu $rowctxmenu
79817981
if {$mainhead ne {}} {
7982-
$menu entryconfigure 7 -label [mc "Reset %s branch to here" $mainhead]
7982+
$menu entryconfigure 7 -label [mc "Reset %s branch to here" $mainhead] -state normal
79837983
} else {
79847984
$menu entryconfigure 7 -label [mc "Detached head: can't reset" $mainhead] -state disabled
79857985
}

0 commit comments

Comments
 (0)