Re: [PATCH 1/7] check_ref_format(): tighten refname rules
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Mar 22, 2009, 23:19 UTC
- Message-ID
- <7vocvtb0xy.fsf@gitster.siamese.dyndns.org>
- In-Reply-To
- <alpine.DEB.1.00.0903221539060.10279@pacific.mpi-cbg.de>
Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:
Show 10 quoted lines
> 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.