git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] Disallow creating ambiguous branch names by default

From
VLVijay 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.
Previous: Junio C HamanoNext: Stephen Bash
Message 3 of 10 in “Disallow creating ambiguous branch names by default”
  1. Disallow creating ambiguous branch names by defaultConrad Irwin, Aug 17, 2011
  2. Junio C HamanoAug 17, 2011
  3. Vijay LakshminarayananAug 18, 2011
  4. Stephen BashAug 18, 2011
  5. Conrad IrwinAug 19, 2011
  6. Stephen BashAug 19, 2011
  7. Conrad IrwinAug 19, 2011
  8. Junio C HamanoAug 19, 2011
  9. Conrad IrwinAug 19, 2011
  10. Junio C HamanoAug 19, 2011

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.