Re: [PATCH v4 4/4] submodule: fix case-folding gitdir filesystem colisions
- From
Aaron Schrab <aaron@schrab.com>
- Date
- Nov 10, 2025, 17:31 UTC
- Message-ID
- <20251110T173154Z.Hhi6cUjqDOat@fnord.qqx.org>
- In-Reply-To
- <87ecq5ke2m.fsf@gentoo.mail-host-address-is-not-set>
At 19:11 +0200 10 Nov 2025, Adrian Ratiu <adrian.ratiu@collabora.com> wrote:
Show 5 quoted lines
>On Sat, 08 Nov 2025, Aaron Schrab <aaron@schrab.com> wrote: >>What happens if `Foo` is added first and doesn't conflict with >>anything, then later a new submodule is added which would naturally >>get the name `foo` which would conflict and doesn't have any upper >>case characters to encode to avoid the conflict?
>Right now, in v4, in this case the user adding the second `foo` module >will have to manually set the submodule.foo.gitdir config to avoid the >conflict, because Foo already uses the coliding path.
I think that description minimizes the impact. I'd think that anyone with a prior clone (on a case-folding file system) would need to take that action after pulling the change that added the new submodule.
If action were needed only when running `git submodule add`, I think that would be fine. But requiring that action in all clones seems a bit much. Some of those clones may even be managed with automation making it even more of a problem to add that new configuration.
The action may even be required in new clones, unless the submodule setup process for new clones sorts entries so that ones with capital letters come later. Since some common collation rules (thinking mainly of the `C` locale) will put capital letters first I think that's unlikely to be the case.
Show 5 quoted lines
>Maybe we could derive a new path automatically (eg foo2 or foo_, >suggestions welcome) and use it if valid. This way, there is no user >intervention. > >Do you have any preference?
I certainly don't have a *strong* preference. But, I think `foo2` seems a bit clearer. Although the implied strategy there for multiple conflicting names may be too complex for a situation that will likely be exceedingly rare.