summaryrefslogtreecommitdiff
path: root/unpack-trees.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2022-06-03 21:30:35 (GMT)
committerJunio C Hamano <gitster@pobox.com>2022-06-03 21:30:35 (GMT)
commitc276c21da6d055060b1c216de1b1c04fb058425f (patch)
tree6db5f39ef5a4b55adbd3401db6fc63fe25b7694e /unpack-trees.c
parent091680472db4ab4604e79259233040a8d5762c06 (diff)
parent598b1e7d0982fd71a25d861dccc1d580ef14ac90 (diff)
downloadgit-c276c21da6d055060b1c216de1b1c04fb058425f.zip
git-c276c21da6d055060b1c216de1b1c04fb058425f.tar.gz
git-c276c21da6d055060b1c216de1b1c04fb058425f.tar.bz2
Merge branch 'ds/sparse-sparse-checkout'
"sparse-checkout" learns to work well with the sparse-index feature. * ds/sparse-sparse-checkout: sparse-checkout: integrate with sparse index p2000: add test for 'git sparse-checkout [add|set]' sparse-index: complete partial expansion sparse-index: partially expand directories sparse-checkout: --no-sparse-index needs a full index cache-tree: implement cache_tree_find_path() sparse-index: introduce partially-sparse indexes sparse-index: create expand_index() t1092: stress test 'git sparse-checkout set' t1092: refactor 'sparse-index contents' test
Diffstat (limited to 'unpack-trees.c')
-rw-r--r--unpack-trees.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/unpack-trees.c b/unpack-trees.c
index a1d0ff3..7d73f62 100644
--- a/unpack-trees.c
+++ b/unpack-trees.c
@@ -19,6 +19,7 @@
#include "promisor-remote.h"
#include "entry.h"
#include "parallel-checkout.h"
+#include "sparse-index.h"
/*
* Error messages expected by scripts out of plumbing commands such as
@@ -2024,6 +2025,9 @@ enum update_sparsity_result update_sparsity(struct unpack_trees_options *o)
goto skip_sparse_checkout;
}
+ /* Expand sparse directories as needed */
+ expand_index(o->src_index, o->pl);
+
/* Set NEW_SKIP_WORKTREE on existing entries. */
mark_all_ce_unused(o->src_index);
mark_new_skip_worktree(o->pl, o->src_index, 0,