]> git.ipfire.org Git - thirdparty/git.git/commit
submodule: hash the submodule name for the gitdir path
authorAdrian Ratiu <adrian.ratiu@collabora.com>
Wed, 7 Jan 2026 23:01:44 +0000 (01:01 +0200)
committerJunio C Hamano <gitster@pobox.com>
Thu, 8 Jan 2026 02:05:16 +0000 (11:05 +0900)
commita612f856fffa81f23b92939edffd5e2885975c29
tree943667866b98f8e63121c3d2630e90292d2283f4
parent1bb1906270ab949133fa1cf376d3f3c99d1b2c4f
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