submodule: sparse-index should not collapse links
commitf442313e2e7a2ebf592a5943d4d4392e88153484
authorDerrick Stolee <dstolee@microsoft.com>
Tue, 30 Mar 2021 13:10:56 +0000 (30 13:10 +0000)
committerJunio C Hamano <gitster@pobox.com>
Tue, 30 Mar 2021 19:57:47 +0000 (30 12:57 -0700)
tree0e03d818e83c8e7f7078ddb23d03e85eb99c588d
parent6e773527b6b03976cefbb0f9571bd40dd5995e6c
submodule: sparse-index should not collapse links

A submodule is stored as a "Git link" that actually points to a commit
within a submodule. Submodules are populated or not depending on
submodule configuration, not sparse-checkout. To ensure that the
sparse-index feature integrates correctly with submodules, we should not
collapse a directory if there is a Git link within its range.

Signed-off-by: Derrick Stolee <dstolee@microsoft.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
sparse-index.c
t/t1092-sparse-checkout-compatibility.sh