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

Re: Possible bug with branch names and case sensitivity

From
Michael Haggerty <mhagger@alum.mit.edu>
Date
Nov 23, 2011, 09:22 UTC
Message-ID
<4ECCBB3D.7070204@alum.mit.edu>
In-Reply-To
<7vwrasdp3t.fsf@alter.siamese.dyndns.org>
On 11/22/2011 06:49 PM, Junio C Hamano wrote:
Show 14 quoted lines
> Michael Haggerty <mhagger@alum.mit.edu> writes:
>> Currently git handles references names case-sensitively and allows
>> multiple reference names that differ only in case.
> 
> We do the same for in-tree paths, by the way.  Ultimately, I think the
> sane thing to do is to appeal to the user's common sense.  [...common
> sense aka "if it hurts don't do it" omitted...]
> 
> I think refnames have exactly the same issue. In theory, you could have
> "Master" and "master" branches, and nothing stops you from trying to do
> so, but in practice, if it is not useful for you and your project, and
> if it is equally fine to use some other name instead of "Master" for the
> purpose of you and your project, then there is no strong reason for doing
> so, unless you are trying to irritate users on case folding platforms.
I agree.

But git could nevertheless help users (1) by providing config settings or hook scripts or something that could be configured in a repository to prevent case-conflicts from entering the project history; (2) by emitting an error when such a conflict arises rather than getting so confused.

Note that Unicode encoding differences can cause very similar problems (even assuming utf8, there can be multiple ways to encode the same string) and should maybe be addressed similarly.

By the way, I'm not volunteering for this project; case-sensitive ASCII's good enough for me :-)

Michael
-- 
Michael Haggerty
mhagger@alum.mit.edu
http://softwareswirl.blogspot.com/
Previous: Junio C HamanoNext: Junio C Hamano
Message 9 of 11 in “Possible bug with branch names and case sensitivity”
  1. Gerd KnopsNov 19, 2011
  2. Jay SoffianNov 21, 2011
  3. Michael HaggertyNov 22, 2011
  4. Jay SoffianNov 22, 2011
  5. Michael HaggertyNov 23, 2011
  6. Ævar Arnfjörð BjarmasonNov 23, 2011
  7. Joshua JensenNov 23, 2011
  8. Junio C HamanoNov 22, 2011
  9. Michael HaggertyNov 23, 2011
  10. Junio C HamanoNov 23, 2011
  11. Junio C HamanoNov 22, 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.