]> git.ipfire.org Git - thirdparty/git.git/commit
submodule: hash the submodule name for the gitdir path
authorAdrian Ratiu <adrian.ratiu@collabora.com>
Sat, 20 Dec 2025 10:15:27 +0000 (12:15 +0200)
committerJunio C Hamano <gitster@pobox.com>
Sun, 21 Dec 2025 02:36:01 +0000 (11:36 +0900)
commite6a298e57c56e028df141fa95e751fd869db6c4b
treefc8dd4d3e407db9c4dbf7397854d8c19303ba376
parentc69414808cc0dd39ca9aa379cb00d5317aa5a7e7
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