From: Junio C Hamano Date: Thu, 15 Dec 2005 23:38:19 GMT Subject: Re: [PATCH] We do not like "HEAD" as a new branch name Message-ID: <7v4q5alyms.fsf@assigned-by-dhcp.cox.net> In-Reply-To: Johannes Schindelin writes: > 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? Just to futureproof ourselves, how about this? /^(?:.*/)?(?:[A-Z0-9]+_)?HEAD$/ The last path component being "HEAD" or capital-or-digit followed by underscore followed by "HEAD".