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

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

From
SBStephen Bash <bash@genarts.com>
Date
Aug 19, 2011, 18:15 UTC
Message-ID
<26995656.83614.1313777742247.JavaMail.root@mail.hq.genarts.com>
In-Reply-To
<CAOTq_ptdf3NvoeQXzdABdnU50w1ZwL=wnF6rPJvZpnqcU64-+g@mail.gmail.com>
----- Original Message -----
Show 14 quoted lines
> From: "Conrad Irwin" <conrad.irwin@gmail.com>
> To: "Stephen Bash" <bash@genarts.com>
> Cc: "Junio C Hamano" <gitster@pobox.com>, git@vger.kernel.org
> Sent: Friday, August 19, 2011 2:07:53 PM
> Subject: Re: [PATCH] Disallow creating ambiguous branch names by default
>
> > Should case insensitive matches be added to the tests? This morning
> > I discovered coworkers working on branches foo and Foo thinking they
> > were on the same branch... Rather trivial to clean up, but certainly
> > caused some confusion in the office.
> 
> I can certainly see the use-case, but there's definitely a step-change
> between "this branch has the same name as something else", and "this
> branch is going to confuse you".
Good point.  I'd be curious if any of the msys/cygwin guys can comment on if/when capitalization in branch names becomes technically ambiguous?  I would think unpacked refs on a Windows machine could get complicated...  And I guess factory Macs are all formated case-insensitive as well, so the same problem might apply there.
Show 8 quoted lines
> When trying to change the code to be
> a warning as Junio suggested, I did think about expanding the
> definition of ambiguous to include things that are merely confusing;
> however it's not clear where to stop (i.e. should we warn about
> <remotename>/<anything>, foo and f00, a branch called " " [the
> non-breaking space]). There's probably an argument for more general
> warning, but I don't think I understand when it should be shown
> well-enough.
Thanks for putting the thought into it, I agree it is a slippery slope.
Stephen
Previous: Conrad IrwinNext: Conrad Irwin
Message 6 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.