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

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

From
APAndy Parkins <andyparkins@gmail.com>
Date
Feb 3, 2007, 17:54 UTC
Message-ID
<200702031754.19494.andyparkins@gmail.com>
In-Reply-To
<slrnes9ga2.3l6.mdw@metalzone.distorted.org.uk>
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).
Show 7 quoted lines
> 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
Previous: Mark WoodingNext: Jakub Narebski
Message 22 of 35 in “prevent HEAD reflog to be interpreted as current branch reflog”
  1. 3/3 prevent HEAD reflog to be interpreted as current branch reflogNicolas Pitre, Feb 1, 2007
  2. Shawn O. PearceFeb 1, 2007
  3. Junio C HamanoFeb 1, 2007
  4. Simon 'corecode' SchubertFeb 1, 2007
  5. Nicolas PitreFeb 1, 2007
  6. Matthias LederhoferFeb 1, 2007
  7. 4/3 provide a nice @{...} syntax to always mean the current branch reflogNicolas Pitre, Feb 1, 2007
  8. 5/3 , was Re: [PATCH 4/3] provide a nice @{...} syntax to always mean the current branch reflogJohannes Schindelin, Feb 1, 2007
  9. 6/3 , was Re: [PATCH 5/3], was Re: [PATCH 4/3] provide a nice @{...} syntax to always mean the current branch reflogJohannes Schindelin, Feb 1, 2007
  10. Junio C HamanoFeb 2, 2007
  11. Nicolas PitreFeb 1, 2007
  12. Jakub NarebskiFeb 2, 2007
  13. Johannes SchindelinFeb 2, 2007
  14. Lars HjemliFeb 2, 2007
  15. Andy ParkinsFeb 2, 2007
  16. Nicolas PitreFeb 2, 2007
  17. Nicolas PitreFeb 2, 2007
  18. Andy ParkinsFeb 2, 2007
  19. Simon 'corecode' SchubertFeb 2, 2007
  20. Nicolas PitreFeb 2, 2007
  21. Mark WoodingFeb 3, 2007
  22. Andy ParkinsFeb 3, 2007
  23. Jakub NarebskiFeb 2, 2007
  24. Simon 'corecode' SchubertFeb 2, 2007
  25. Simon 'corecode' SchubertFeb 2, 2007
  26. Nicolas PitreFeb 2, 2007
  27. Lars HjemliFeb 2, 2007
  28. Johannes SchindelinFeb 5, 2007
  29. Shawn O. PearceFeb 5, 2007
  30. Johannes SchindelinFeb 5, 2007
  31. Lars HjemliFeb 5, 2007
  32. Andy ParkinsFeb 2, 2007
  33. Rogan DawesFeb 2, 2007
  34. Andy ParkinsFeb 2, 2007
  35. Junio C HamanoFeb 3, 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.