From: Junio C Hamano Date: Mon, 10 Nov 2025 23:17:31 GMT Subject: Re: [PATCH v4 4/4] submodule: fix case-folding gitdir filesystem colisions Message-ID: In-Reply-To: <878qgdjxvc.fsf@collabora.com> Adrian Ratiu writes: > 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?