From: Johannes Schindelin Date: Thu, 15 Dec 2005 22:41:26 GMT Subject: Re: [PATCH] We do not like "HEAD" as a new branch name Message-ID: In-Reply-To: <7vacf2p320.fsf@assigned-by-dhcp.cox.net> Hi, On Thu, 15 Dec 2005, Junio C Hamano wrote: > Johannes Schindelin 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