{"thread":{"id":"16578","subject":"[PATCH] gitk: Ensure that \"Reset branch\" menu entry is enabled","startedAt":"2008-12-03T12:43:20Z","lastAt":"2008-12-18T10:42:30Z","messageCount":2,"participants":["Johannes Sixt"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"97059","messageId":"1228308200-28693-1-git-send-email-j6t@kdbg.org","threadId":"16578","inReplyTo":null,"subject":"[PATCH] gitk: Ensure that \"Reset branch\" menu entry is enabled","fromName":"Johannes Sixt","fromEmail":"j6t@kdbg.org","sentAt":"2008-12-03T12:43:20Z","receivedAt":"2008-12-03T12:43:20Z","isPatch":true,"sender":{"key":"j6t@kdbg.org","avatar":"https://avatars.githubusercontent.com/u/14810926?v=4"},"body":"Consider this sequence of events:\n\n1. Detach HEAD and fire up gitk\n2. Call the context menu on some commit. Notice that the last menu entry\n   says \"Detached HEAD: can't reset\" and it is disabled.\n3. Now checkout some regular branch (e.g. 'master') using the context menu.\n4. Call the context menu again on some commit.\n\nPreviously, at this point the last menu entry said \"Reset master branch\nto here\", but it was still disabled. With this fix it is now enabled again.\n\nSigned-off-by: Johannes Sixt <j6t@kdbg.org>\n---\n gitk |    2 +-\n 1 files changed, 1 insertions(+), 1 deletions(-)\n\ndiff --git a/gitk b/gitk\nindex f7f1776..6c4022a 100755\n--- a/gitk\n+++ b/gitk\n@@ -7950,7 +7950,7 @@ proc rowmenu {x y id} {\n     if {$id ne $nullid && $id ne $nullid2} {\n \tset menu $rowctxmenu\n \tif {$mainhead ne {}} {\n-\t    $menu entryconfigure 7 -label [mc \"Reset %s branch to here\" $mainhead]\n+\t    $menu entryconfigure 7 -label [mc \"Reset %s branch to here\" $mainhead] -state normal\n \t} else {\n \t    $menu entryconfigure 7 -label [mc \"Detached head: can't reset\" $mainhead] -state disabled\n \t}\n-- \n1.6.1.rc1\n"},{"id":"98244","messageId":"494A2916.6010405@viscovery.net","threadId":"16578","inReplyTo":"1228308200-28693-1-git-send-email-j6t@kdbg.org","subject":"Re: [PATCH] gitk: Ensure that \"Reset branch\" menu entry is enabled","fromName":"Johannes Sixt","fromEmail":"j.sixt@viscovery.net","sentAt":"2008-12-18T10:42:30Z","receivedAt":"2008-12-18T10:42:30Z","isPatch":true,"sender":{"key":"j6t@kdbg.org","avatar":"https://avatars.githubusercontent.com/u/14810926?v=4"},"body":"Johannes Sixt schrieb:\n> Consider this sequence of events:\n> \n> 1. Detach HEAD and fire up gitk\n> 2. Call the context menu on some commit. Notice that the last menu entry\n>    says \"Detached HEAD: can't reset\" and it is disabled.\n> 3. Now checkout some regular branch (e.g. 'master') using the context menu.\n> 4. Call the context menu again on some commit.\n> \n> Previously, at this point the last menu entry said \"Reset master branch\n> to here\", but it was still disabled. With this fix it is now enabled again.\n\nDid you consider this patch?\n\n-- Hannes\n\n> \n> Signed-off-by: Johannes Sixt <j6t@kdbg.org>\n> ---\n>  gitk |    2 +-\n>  1 files changed, 1 insertions(+), 1 deletions(-)\n> \n> diff --git a/gitk b/gitk\n> index f7f1776..6c4022a 100755\n> --- a/gitk\n> +++ b/gitk\n> @@ -7950,7 +7950,7 @@ proc rowmenu {x y id} {\n>      if {$id ne $nullid && $id ne $nullid2} {\n>  \tset menu $rowctxmenu\n>  \tif {$mainhead ne {}} {\n> -\t    $menu entryconfigure 7 -label [mc \"Reset %s branch to here\" $mainhead]\n> +\t    $menu entryconfigure 7 -label [mc \"Reset %s branch to here\" $mainhead] -state normal\n>  \t} else {\n>  \t    $menu entryconfigure 7 -label [mc \"Detached head: can't reset\" $mainhead] -state disabled\n>  \t}\n"}]}