]> git.ipfire.org Git - thirdparty/git.git/blob - sparse-index.h
Merge branch 'ab/trace2-squelch-gcc-warning'
[thirdparty/git.git] / sparse-index.h
1 #ifndef SPARSE_INDEX_H__
2 #define SPARSE_INDEX_H__
3
4 struct index_state;
5 int convert_to_sparse(struct index_state *istate);
6
7 /*
8 * Some places in the codebase expect to search for a specific path.
9 * This path might be outside of the sparse-checkout definition, in
10 * which case a sparse-index may not contain a path for that index.
11 *
12 * Given an index and a path, check to see if a leading directory for
13 * 'path' exists in the index as a sparse directory. In that case,
14 * expand that sparse directory to a full range of cache entries and
15 * populate the index accordingly.
16 */
17 void expand_to_path(struct index_state *istate,
18 const char *path, size_t pathlen, int icase);
19
20 struct repository;
21 int set_sparse_index_config(struct repository *repo, int enable);
22
23 #endif