Thread (28 messages) flat view 28 messages, 10 authors, 2016-06-15

Re: [PATCH 3/3] prevent HEAD reflog to be interpreted as current branch reflog

From: Andy Parkins <hidden>
Date: 2016-06-15 22:42:52

Possibly related (same subject, not in this thread)

On Saturday 2007, February 03 17:07, Mark Wooding wrote:
And what do you do when HEAD is detached?
Well; my proposal was that when head is detached HEAD@{} would return 
the "unnamed branch" reflog.

However, that idea has been rejected (which I'm fine with).
I mean: I detach HEAD, and then ask about HEAD@{yesterday}.  It'd be
nonsensical for that to be an error, since HEAD surely did have a
value yesterday.  But it can't tell me where my current branch head
was yesterday, because there isn't a current branch to tell me about.

HEAD@{date} referring to the HEAD reflog is the only sane thing to
do.
Well I don't think "only sane thing" is entirely accurate; I'm happy to 
accept counter arguments, but rhetoric doesn't count.

My (abandoned) suggestion was that

 HEAD@{..} on a undetached head would be equal to <current-branch>@{..}
 HEAD@{..} on a detached head would be equal to unnamed-branch@{..}
 @{..} would be equal to <whatever-i-was-on>@{...}

I accept (but not necessarily condone) that the counter proposal is also 
valid.  My argument is about which is the more consistent.  It would 
appear to be a judgment call; so I'm happy to bow out.  I don't think 
calling me insane (by proxy) lends any weight to any argument.



Andy

-- 
Dr Andrew Parkins, M Eng (Hons), AMIEE
andyparkins@gmail.com
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help