aboutsummaryrefslogtreecommitdiffstats
path: root/sparse-index.h
diff options
context:
space:
mode:
Diffstat (limited to 'sparse-index.h')
-rw-r--r--sparse-index.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/sparse-index.h b/sparse-index.h
index 9f3d7bc7fa..59a92d819e 100644
--- a/sparse-index.h
+++ b/sparse-index.h
@@ -3,7 +3,10 @@
struct index_state;
#define SPARSE_INDEX_MEMORY_ONLY (1 << 0)
+int is_sparse_index_allowed(struct index_state *istate, int flags);
int convert_to_sparse(struct index_state *istate, int flags);
+void ensure_correct_sparsity(struct index_state *istate);
+void clear_skip_worktree_from_present_files(struct index_state *istate);
/*
* Some places in the codebase expect to search for a specific path.
@@ -21,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