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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Johannes Schindelin <Johannes.Schindelin@xxxxxx> writes:

> @@ -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?

>  			die "Cannot detach HEAD"
>  		if test -n "$detach_warn"
>  		then
> -- 
> 1.5.3.rc4.17.gb980

-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux