diff options
author | Junio C Hamano <gitster@pobox.com> | 2022-06-03 23:30:35 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2022-06-03 23:30:35 +0200 |
commit | c276c21da6d055060b1c216de1b1c04fb058425f (patch) | |
tree | 6db5f39ef5a4b55adbd3401db6fc63fe25b7694e /sparse-index.h | |
parent | Merge branch 'tb/midx-race-in-pack-objects' (diff) | |
parent | sparse-checkout: integrate with sparse index (diff) | |
download | git-c276c21da6d055060b1c216de1b1c04fb058425f.tar.xz git-c276c21da6d055060b1c216de1b1c04fb058425f.zip |
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 'sparse-index.h')
-rw-r--r-- | sparse-index.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/sparse-index.h b/sparse-index.h index f57c65d972..59a92d819e 100644 --- a/sparse-index.h +++ b/sparse-index.h @@ -24,4 +24,17 @@ void expand_to_path(struct index_state *istate, struct repository; int set_sparse_index_config(struct repository *repo, int enable); +struct pattern_list; + +/** + * Scan the given index and compare its entries to the given pattern list. + * If the index is sparse and the pattern list uses cone mode patterns, + * then modify the index to contain the all of the file entries within that + * new pattern list. This expands sparse directories only as far as needed. + * + * If the pattern list is NULL or does not use cone mode patterns, then the + * index is expanded to a full index. + */ +void expand_index(struct index_state *istate, struct pattern_list *pl); + #endif |