Re: [PATCH] We do not like "HEAD" as a new branch name
- From
Junio C Hamano <junkio@cox.net>
- Date
- Dec 15, 2005, 19:34 UTC
- Message-ID
- <7vacf2p320.fsf@assigned-by-dhcp.cox.net>
- In-Reply-To
- <Pine.LNX.4.63.0512151244230.22400@wbgn013.biozentrum.uni-wuerzburg.de>
Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:
> + /* do not allow "HEAD" as ref name */ > + if (ch == 'H' && (!strcmp(cp, "EAD") || > + !strncmp(cp, "EAD/", 4)))
Why forbid HEAD in the middle, like "refs/heads/HEAD/frotz"? Confusion avoidance?
We might want to forbid anything that matches /^.*_?HEAD$/ to catch ORIG_HEAD for example, though.