]> git.ipfire.org Git - thirdparty/git.git/commit
builtin/clone: propagate ref storage format to submodules
authorPatrick Steinhardt <ps@pks.im>
Thu, 8 Aug 2024 07:35:37 +0000 (09:35 +0200)
committerJunio C Hamano <gitster@pobox.com>
Thu, 8 Aug 2024 16:21:39 +0000 (09:21 -0700)
commit69814846aba19f864e8140c2de982ea345f4ce1b
treef322037cf359168f95a8d705b7ffbdfc9a4f6ca1
parent5ac781ad624a32ca4136eae40b4f416b21f0af96
builtin/clone: propagate ref storage format to submodules

When recursively cloning a repository with a non-default ref storage
format, e.g. by passing the `--ref-format=` option, then only the
top-level repository will end up using that ref storage format, and
all recursively cloned submodules will instead use the default format.

While mixed-format constellations are expected to work alright, the
outcome still is somewhat surprising as we have essentially ignored
the user's request.

Fix this by propagating the requested ref format to cloned submodules.

Signed-off-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/clone.c
t/t7424-submodule-mixed-ref-formats.sh