]> git.ipfire.org Git - thirdparty/git.git/commit - submodule.c
submodule: properly recurse for read-tree and checkout
authorStefan Beller <sbeller@google.com>
Tue, 2 May 2017 19:32:14 +0000 (12:32 -0700)
committerJunio C Hamano <gitster@pobox.com>
Thu, 4 May 2017 04:42:05 +0000 (13:42 +0900)
commit218c883783ee7c23a0955507f5b7ac4027428d63
treee8398891051dc63d4dc6c568288b80b344383500
parentda27bc81f00fb5315341b26db8879c266e8ba1a2
submodule: properly recurse for read-tree and checkout

We forgot to prepare the submodule env, which is only a problem for
nested submodules. See 2e5d6503bd (ls-files: fix recurse-submodules
with nested submodules, 2017-04-13) for further explanation.

To come up with a proper test for this, we'd need to look at nested
submodules just as in that given commit. It turns out we're lucky
and these tests already exist, but are marked as failing. We need
to pass `--recurse-submodules` to read-tree additionally to make
these tests pass. Passing that flag alone would not make the tests
pass, such that this covers testing for the bug fix of the submodule
env as well.

Signed-off-by: Stefan Beller <sbeller@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
submodule.c
t/lib-submodule-update.sh
t/t1013-read-tree-submodule.sh
t/t2013-checkout-submodule.sh