git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] gitk: Ensure that "Reset branch" menu entry is enabled

From
Johannes Sixt <j.sixt@viscovery.net>
Date
Dec 18, 2008, 10:42 UTC
Message-ID
<494A2916.6010405@viscovery.net>
In-Reply-To
<1228308200-28693-1-git-send-email-j6t@kdbg.org>
Johannes Sixt schrieb:
Show 10 quoted lines
> 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.
Did you consider this patch?
-- Hannes
Show 19 quoted lines
> 
> Signed-off-by: Johannes Sixt <j6t@kdbg.org>
> ---
>  gitk |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/gitk b/gitk
> index f7f1776..6c4022a 100755
> --- a/gitk
> +++ b/gitk
> @@ -7950,7 +7950,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
>  	}
Previous: Johannes Sixt
Message 2 of 2 in “gitk: Ensure that "Reset branch" menu entry is enabled”
  1. gitk: Ensure that "Reset branch" menu entry is enabledJohannes Sixt, Dec 3, 2008
  2. Johannes SixtDec 18, 2008

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.