]> git.ipfire.org Git - thirdparty/git.git/commit
submodule--helper: use submodule_name_to_gitdir in add_submodule
authorAdrian Ratiu <adrian.ratiu@collabora.com>
Sat, 20 Dec 2025 10:15:18 +0000 (12:15 +0200)
committerJunio C Hamano <gitster@pobox.com>
Sun, 21 Dec 2025 02:36:00 +0000 (11:36 +0900)
commit8e254ec817d7fb2daefba5ba8af032faaefa91d1
treeed2b2587f8a247cd667ec3e12fae39cc0012b171
parent4badef0c3503dc29059d678abba7fac0f042bc84
submodule--helper: use submodule_name_to_gitdir in add_submodule

While testing submodule gitdir path encoding, I noticed submodule--helper
is still using a hardcoded modules gitdir path leading to test failures.

Call the submodule_name_to_gitdir() helper instead, which was invented
exactly for this purpose and is already used by all the other locations
which work on gitdirs.

Also narrow the scope of the submod_gitdir_path variable which is not
used anymore in the updated "else" branch.

Signed-off-by: Adrian Ratiu <adrian.ratiu@collabora.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/submodule--helper.c