]> git.ipfire.org Git - thirdparty/git.git/blame - sparse-index.h
Merge branch 'mg/detect-compiler-in-c-locale' into maint
[thirdparty/git.git] / sparse-index.h
CommitLineData
3964fc2a
DS
1#ifndef SPARSE_INDEX_H__
2#define SPARSE_INDEX_H__
3
4struct index_state;
ce7a9f01
DS
5#define SPARSE_INDEX_MEMORY_ONLY (1 << 0)
6int convert_to_sparse(struct index_state *istate, int flags);
b93fea08 7void ensure_correct_sparsity(struct index_state *istate);
af6a5187 8void clear_skip_worktree_from_present_files(struct index_state *istate);
3964fc2a 9
71f82d03
DS
10/*
11 * Some places in the codebase expect to search for a specific path.
12 * This path might be outside of the sparse-checkout definition, in
13 * which case a sparse-index may not contain a path for that index.
14 *
15 * Given an index and a path, check to see if a leading directory for
16 * 'path' exists in the index as a sparse directory. In that case,
17 * expand that sparse directory to a full range of cache entries and
18 * populate the index accordingly.
19 */
20void expand_to_path(struct index_state *istate,
21 const char *path, size_t pathlen, int icase);
22
122ba1f7
DS
23struct repository;
24int set_sparse_index_config(struct repository *repo, int enable);
25
3964fc2a 26#endif