Re: [PATCH] Proof-of-concept patch to remember what the detached HEAD was
- From
Thomas Rast <trast@student.ethz.ch>
- Date
- Oct 15, 2009, 22:56 UTC
- Message-ID
- <200910160056.33217.trast@student.ethz.ch>
- In-Reply-To
- <alpine.LNX.2.00.0910151517070.32515@iabervon.org>
Daniel Barkalow wrote:
Show 6 quoted lines
> On Thu, 15 Oct 2009, Nicolas Pitre wrote: > > > On Thu, 15 Oct 2009, Daniel Barkalow wrote: > > > > > I think the description used in CVS and SVN (and, I think, others) is that > > > you're not at the HEAD revision.
[...]
Show 9 quoted lines
> > > * origin/master (not at head) > > > $ git checkout 123cafe^5; git branch > > > * 123cafe^5 (not at head) > > > > I think this is wrong. Git has multiple heads, and insisting on "not at > > head" would be extremely confusing. > > Maybe "(not at a head)"? Git does have multiple heads, but what's checked > out isn't one of them, and that's actually the point.
Please don't reuse 'head' (even lowercase) in this context/meaning. I see enough people coming to IRC who are confused about the fact that they checked out some old commit, hence HEAD is just that, but they refer to the *newest* commit on whatever branch they like most as HEAD because that's what it means in SVN.
Now imagine having to explain to them that their (SVN) 'HEAD' is not the same as git's 'HEAD', but can rightly be considered the equivalent of master's 'head'; and that furthermore, you are always at 'HEAD' but not always at 'head'.
I think in this case '(detached)' would be more consistent with current terminology, though we may of course try to change it.
(I've tried to consistently use 'tip' in the branch tip meaning, admittedly without knowing exactly how this intersects with mercurial's definition of the term.)
--
Thomas Rast
trast@{inf,student}.ethz.ch