Re: [PATCH 5/5] docs/checkout: clarify what "non-branch" means
- From
Jeff King <peff@peff.net>
- Date
- Apr 15, 2009, 17:58 UTC
- Message-ID
- <20090415175846.GF23332@coredump.intra.peff.net>
- In-Reply-To
- <7vmyakh5wc.fsf@gitster.siamese.dyndns.org>
On Mon, Apr 13, 2009 at 09:31:31AM -0700, Junio C Hamano wrote:
Show 9 quoted lines
> > I hope this helps a little bit with Mark's confusion. But while writing > > it, I really think it would be a simpler rule to say "if it's in > > refs/heads/, then it's a branch" (which is similar to what Mark > > suggested earlier). > > > > So "git checkout refs/heads/master" would be identical to "git checkout > > master". That would require a code change, though. > > Sorry, but I do not get the logic behind such a change.
It is entirely about simplifying the mental model of "what is a branch" for the user, and making it easier to explain in the documentation.
I think otherwise your analysis was right: it doesn't really buy much in practical usage, and it slightly hurts people with crazy branch names like "refs/heads/refs/heads/foo" (but I consider that unlikely enough not to worry about).
-Peff