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
This commit is contained in:
Junio C Hamano
2022-06-03 14:30:35 -07:00
10 changed files with 279 additions and 50 deletions

View File

@ -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,