Re: [PATCH v4 4/4] submodule: fix case-folding gitdir filesystem colisions
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Nov 10, 2025, 23:17 UTC
- Message-ID
- <xmqqjyzxxyt0.fsf@gitster.g>
- In-Reply-To
- <878qgdjxvc.fsf@collabora.com>
Adrian Ratiu <adrian.ratiu@collabora.com> writes:
Show 7 quoted lines
> I tried the mkdir approach. Unfortunately it does not work because > submodule_name_to_gitdir() is called on all submodule paths: both > existing or new, valid or non-valid. > > So if a dir already exists, we do not know if there is a > conflict. It might just be a normal valid path verification of an > existing module.
Puzzled. Wouldn't that only mean that submodule-name-to-gitdir is a wrong place to see if the name of a directory you are planning to use for a newly added submodule is available? IOW, don't you need a more specific new helper function and perform the check in there?