Subject: Re: [PATCH] lockfile: add case insensitive filesystem note

From: Patrick Steinhardt <[email-masked]>
Date: Tue, 23 Sep 2025 09:56:13 +0200

On Mon, Sep 22, 2025 at 09:54:44PM +0000, Alan Da Costa via GitGitGadget wrote:
> From: Alan Da Costa <[email-masked]>
> When running git fetch or git pull on a case insensitive filesystem
> (e.g., default macOS), if multiple case variants of the same remote ref
> exist (often after a case-only rename), both variant locks map to the
> same on-disk path. When a local update is required, Git creates a lock
> for the first variant and then attempts to lock the second, which
> collides with the same lock file, so an “existing lock” error is
> reported. The underlying issue is mixed-case refs; resolve it by
> consolidating the remote to a single-case variant and update local refs
> accordingly.

Are you aware of Karthik's recent patch series at [1]? It looks like
this addresses your exact problem in a more direct way, and the
resulting error messages that we have in that patch series also give a
bit more advice for how to handle the situation.

The patch series wasn't merged yet, but will probably be merged soon.
Could you maybe test that series and say whether it addresses your need?

Thanks!

Patrick

[1]: https://lore.kernel.org/git/20250902-587-git-fetch-1-[email-masked]/