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

Re: RFD: Handling case-colliding filenames on case-insensitive filesystems

From
Shawn Pearce <spearce@spearce.org>
Date
Feb 23, 2011, 19:01 UTC
Message-ID
<AANLkTi=gAM3LGwU47_EkENerZeKmjwuhWhpHZJGSiW=n@mail.gmail.com>
In-Reply-To
<7vmxlm8trt.fsf@alter.siamese.dyndns.org>
On Wed, Feb 23, 2011 at 10:56, Junio C Hamano <gitster@pobox.com> wrote:
Show 6 quoted lines
> Johan Herland <johan@herland.net> writes:
>
>> Are there better suggestions on how to deal with this?
>
> Just from the top off my head, perhaps you can go to the same route as
> symbolic link support on filesystems that are not symlink-capable?

I don't know how that helps here Junio. On those systems we write a text file holding the symlink contents. That text file name is at least still unique in the working directory.

Perhaps instead the "colliding file" becomes a directory that stores all of the files below it, each with a unique name and a table of contents, e.g.:

  foo.txt/
    git-contents:
      file-A foo.TXT
      file-B FOO.txt
    file-A:
      ... the contents of foo.TXT ..
    file-B:
      ... the contents of FOO.txt ..

It would be hard to work with in the index, and the project's build system might fail, but at least the user can edit both files using normal tools in the working tree, and can see which one is which using the magic git-contents file.

This is such an odd corner case though, we need really good tests for it, because it won't come up in daily usage very often. :-(

-- 
Shawn.
Previous: Junio C HamanoNext: Junio C Hamano
Message 3 of 12 in “RFD: Handling case-colliding filenames on case-insensitive filesystems”
  1. Johan HerlandFeb 23, 2011
  2. Junio C HamanoFeb 23, 2011
  3. Shawn PearceFeb 23, 2011
  4. Junio C HamanoFeb 23, 2011
  5. Johan HerlandFeb 24, 2011
  6. Junio C HamanoFeb 24, 2011
  7. Johan HerlandFeb 24, 2011
  8. Jay SoffianFeb 23, 2011
  9. Matthieu MoyFeb 23, 2011
  10. Marc BranchaudFeb 23, 2011
  11. Greg TroxelFeb 23, 2011
  12. Johan HerlandFeb 24, 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.