Re: [PATCH] Disallow creating ambiguous branch names by default
- From
- Vijay Lakshminarayanan <laksvij@gmail.com>
- Date
- Aug 18, 2011, 03:35 UTC
- Message-ID
- <87k4abfl2a.fsf@gmail.com>
- In-Reply-To
- <7vhb5fev8a.fsf@alter.siamese.dyndns.org>
Junio C Hamano <gitster@pobox.com> writes:
Show 16 quoted lines
> We should be giving these warning messages immediately after creating > potentially problematic refs, i.e. just after "git branch v1.0.0" and > "git checkout -b v1.0.0". The user experience should look like this > instead: > > $ git branch v1.0.0 > warning: refname 'v1.0.0' is ambiguous. > advice: you may want to rename it to an unambigous name with > advice: git branch -m v1.0.0 v1.0.0-branch > $ git branch -m v1.0.0 v1.0.0-branch ;# thanks for an advice > > $ git checkout -b v1.0.0 > warning: refname 'v1.0.0' is ambiguous. > advice: you may want to rename it to an unambigous name with > advice: git branch -m v1.0.0-branch-2 > $ git branch -m v1.0.0-branch-2 ;# thanks for an advice
I'm not familiar with the git codebase, but I'm guessing this is ambiguous because there's already a tag by name v1.0.0. /If/ that's the case, wouldn't be be prudent to explain why the branch name is ambiguous?
Just my 2c.
-- Cheers ~vijay Gnus should be more complicated.