Thread (1 message) 1 message, 1 author, 2016-06-15

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

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:43:27

Johannes Schindelin [off-list ref] writes:
quoted hunk
@@ -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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help