Re: [PATCH 1/2] sha1_name.c: signal if @{-N} was a true branch nameor a detached head

2013-05-13 Thread Jeff King
On Thu, May 09, 2013 at 10:08:24AM -0700, Junio C Hamano wrote: Jeff King p...@peff.net writes: Since the point of marking the detached HEAD is to turn off things like @{-1}@{u}, we would want to be generous and err on the side of assuming it is a branch if it _might_ be one. I am not

Re: [PATCH 1/2] sha1_name.c: signal if @{-N} was a true branch nameor a detached head

2013-05-09 Thread Jeff King
On Wed, May 08, 2013 at 02:12:29PM -0700, Junio C Hamano wrote: The original API read checkout: moving from (.*) to ... from the reflog of the HEAD, and returned the substring between from and to, but there was no way, if the substring was a 40-hex string, to tell if we were on a detached

Re: [PATCH 1/2] sha1_name.c: signal if @{-N} was a true branch nameor a detached head

2013-05-09 Thread Junio C Hamano
Jeff King p...@peff.net writes: Since the point of marking the detached HEAD is to turn off things like @{-1}@{u}, we would want to be generous and err on the side of assuming it is a branch if it _might_ be one. I am not sure X and Y mesh well in your Since X, we would want Y. It seems to

Re: [PATCH 1/2] sha1_name.c: signal if @{-N} was a true branch nameor a detached head

2013-05-09 Thread Eric Sunshine
On Wed, May 8, 2013 at 5:12 PM, Junio C Hamano gits...@pobox.com wrote: sha1_name.c: signal if @{-N} was a true branch nameor a detached head s/nameor/name or/ The original API read checkout: moving from (.*) to ... from the reflog of the HEAD, and returned the substring between from and to,

[PATCH 1/2] sha1_name.c: signal if @{-N} was a true branch nameor a detached head

2013-05-08 Thread Junio C Hamano
The original API read checkout: moving from (.*) to ... from the reflog of the HEAD, and returned the substring between from and to, but there was no way, if the substring was a 40-hex string, to tell if we were on a detached HEAD at that commit object, or on a branch whose name happened to be the