From: Junio C Hamano Date: Sun, 22 Mar 2009 23:19:21 GMT Subject: Re: [PATCH 1/7] check_ref_format(): tighten refname rules Message-ID: <7vocvtb0xy.fsf@gitster.siamese.dyndns.org> In-Reply-To: Johannes Schindelin writes: > On Sat, 21 Mar 2009, Junio C Hamano wrote: > >> Yes, I know that tightening rules retroactively is bad, but this changes >> the rules for refnames to forbid: > > Tightening rules retroactively is not only bad (if sometimes necessary), > but tightening rules without giving the user a chance to recover is really > bad. > > 'git branch -m' uses check_ref_format() to check the old name. Because "git branch -d" still allows a malformed funny branch to be removed with this patch, I would say it is Ok as long as release notes clearly says what we are tightening the rule for. It is very probable that some people may have "master@{24}" in their repositories, but such a branch cannot be accessed with or without this patch anyway, and it is unlikely they created it because they wanted to. "git branch wtf-dot wtf." followed by "git branch -d wtf." also works; for this one, it might make sense to allow "git branch -m" to rename it, but I do not think it is worth it.