Re: [PATCH] We do not like "HEAD" as a new branch name
- From
Johannes Schindelin <johannes.schindelin@gmx.de>
- Date
- Dec 15, 2005, 22:41 UTC
- Message-ID
- <Pine.LNX.4.63.0512152339530.4962@wbgn013.biozentrum.uni-wuerzburg.de>
- In-Reply-To
- <7vacf2p320.fsf@assigned-by-dhcp.cox.net>
Hi,
On Thu, 15 Dec 2005, Junio C Hamano wrote:
Show 8 quoted lines
> 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?
Exactly.
> We might want to forbid anything that matches /^.*_?HEAD$/ to catch > ORIG_HEAD for example, though.
Okay, I think this is what *I* would want to be illegal:
HEAD, ORIG_HEAD, FETCH_HEAD MERGE_HEAD
Others? Or should I really test for just *anything* ending in _HEAD besides HEAD itself?
Ciao, Dscho