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

Re: Can't handle renamed resources on case insensitive filesystems.

From
Erik Faye-Lund <kusmabite@googlemail.com>
Date
Dec 14, 2009, 14:50 UTC
Message-ID
<40aa078e0912140650t7e061da0nfc75955cb584f3ba@mail.gmail.com>
In-Reply-To
<63135FDB-C8EF-4DBC-AEF5-4B0636C8D349@gmail.com>
On Mon, Dec 14, 2009 at 3:27 PM, Lhunath (Maarten B.) <lhunath@gmail.com> wrote:
Show 12 quoted lines
> GIT has quite a few issues concerning renamed files on case insensitive filesystems, such as Mac OS X's default HFS+.
>
> For instance:
>
> lhunath@Myst t $ git mv Foo foo
> fatal: destination exists, source=Foo, destination=foo
>
> Moreover, when a repository contains Foo and foo in one commit and in a subsequent commit, "foo" is removed; "Foo" will also disappear when checking out the latter.
>
> Most of these issues are likely just a result of the underlying file system's handling of GIT's commands; though considering that Mac OS X's default fs is case insensitive by default, and the Mac and Windows userbases combined are quite large; it might be very much appropriate to do a check for this (if needed) and handle renames (and other operations?) in a way that they would not cause conflicts on these file systems (eg. rename to a temporary filename first and then rename to destination).
>
> In particular; these issues make it awfully painful to refactor Java class names from things like JndiUtils -> JNDIUtils.  Not only is it hard to get the commit INTO the repository correctly; it is also hard to check the commit OUT for somebody who has no idea any of this is needed.--

Actually, you have only discovered the tip of the iceberg that is git and case insensitivity. However, it is probably also the most annoying part of it. Changing git mv to skip moving (or moving in a way that works better) the file when core.ignorecase is enabled and the source and destination are the same when compared in a case insensitive fashion might make sense.

-- 
Erik "kusma" Faye-Lund
Previous: Lhunath (Maarten B.)Next: Erik Faye-Lund
Message 2 of 4 in “Can't handle renamed resources on case insensitive filesystems.”
  1. Lhunath (Maarten B.)Dec 14, 2009
  2. Erik Faye-LundDec 14, 2009
  3. Erik Faye-LundDec 14, 2009
  4. Tomas CarneckyDec 14, 2009

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.