On Mon, Apr 13, 2009 at 09:31:31AM -0700, Junio C Hamano wrote:
quoted
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