Merge branch 'tb/midx-race-in-pack-objects'
[git/debian.git] / sparse-index.h
blobf57c65d972f474a38a8add549248df834a157c06
1 #ifndef SPARSE_INDEX_H__
2 #define SPARSE_INDEX_H__
4 struct index_state;
5 #define SPARSE_INDEX_MEMORY_ONLY (1 << 0)
6 int is_sparse_index_allowed(struct index_state *istate, int flags);
7 int convert_to_sparse(struct index_state *istate, int flags);
8 void ensure_correct_sparsity(struct index_state *istate);
9 void clear_skip_worktree_from_present_files(struct index_state *istate);
12 * Some places in the codebase expect to search for a specific path.
13 * This path might be outside of the sparse-checkout definition, in
14 * which case a sparse-index may not contain a path for that index.
16 * Given an index and a path, check to see if a leading directory for
17 * 'path' exists in the index as a sparse directory. In that case,
18 * expand that sparse directory to a full range of cache entries and
19 * populate the index accordingly.
21 void expand_to_path(struct index_state *istate,
22 const char *path, size_t pathlen, int icase);
24 struct repository;
25 int set_sparse_index_config(struct repository *repo, int enable);
27 #endif