]> git.ipfire.org Git - thirdparty/git.git/commit
submodule: hash the submodule name for the gitdir path
authorAdrian Ratiu <adrian.ratiu@collabora.com>
Mon, 12 Jan 2026 18:46:31 +0000 (20:46 +0200)
committerJunio C Hamano <gitster@pobox.com>
Mon, 12 Jan 2026 19:56:57 +0000 (11:56 -0800)
commit82c36fa0a987c9c8617f5ded41834f7487e616e2
treecde4f51ecc8b2a19475432c2aa6c34d289457b2d
parent1685bba838ace8b4e325616ab914a6b01f18547f
submodule: hash the submodule name for the gitdir path

If none of the previous plain-text / encoding / derivation steps work
and case 2.4 is reached, then try a hash of the submodule name to see
if that can be a valid gitdir before giving up and throwing an error.

This is a "last resort" type of measure to avoid conflicts since it
loses the human readability of the gitdir path. This logic will be
reached in rare cases, as can be seen in the test we added.

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