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

Re: [PATCH] git checkout's reflog: even when detaching the HEAD, say from where

From
Junio C Hamano <gitster@pobox.com>
Date
Aug 7, 2007, 03:56 UTC
Message-ID
<7v8x8o9euy.fsf@assigned-by-dhcp.cox.net>
In-Reply-To
<Pine.LNX.4.64.0708070242140.14781@racer.site>
Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:
Show 7 quoted lines
> @@ -272,7 +272,8 @@ if [ "$?" -eq 0 ]; then
>  		fi
>  	elif test -n "$detached"
>  	then
> -		git update-ref --no-deref -m "checkout: moving to $arg" HEAD "$detached" ||
> +		old_branch_name=`expr "z$oldbranch" : 'zrefs/heads/\(.*\)'`
> +		git update-ref --no-deref -m "checkout: moving from $old_branch_name to $arg" HEAD "$detached" ||
Can't old_branch_name be empty here if you are already detached?
Show 5 quoted lines
>  			die "Cannot detach HEAD"
>  		if test -n "$detach_warn"
>  		then
> -- 
> 1.5.3.rc4.17.gb980
Previous: Johannes Schindelin
Message 2 of 2 in “git checkout's reflog: even when detaching the HEAD, say from where”
  1. git checkout's reflog: even when detaching the HEAD, say from whereJohannes Schindelin, Aug 7, 2007
  2. Junio C HamanoAug 7, 2007

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.