summaryrefslogtreecommitdiff
path: root/cache.h
diff options
context:
space:
mode:
Diffstat (limited to 'cache.h')
-rw-r--r--cache.h13
1 files changed, 12 insertions, 1 deletions
diff --git a/cache.h b/cache.h
index bb317abc91..136dd496c9 100644
--- a/cache.h
+++ b/cache.h
@@ -204,6 +204,8 @@ struct cache_entry {
#error "CE_EXTENDED_FLAGS out of range"
#endif
+#define S_ISSPARSEDIR(m) ((m) == S_IFDIR)
+
/* Forward structure decls */
struct pathspec;
struct child_process;
@@ -319,7 +321,14 @@ struct index_state {
drop_cache_tree : 1,
updated_workdir : 1,
updated_skipworktree : 1,
- fsmonitor_has_run_once : 1;
+ fsmonitor_has_run_once : 1,
+
+ /*
+ * sparse_index == 1 when sparse-directory
+ * entries exist. Requires sparse-checkout
+ * in cone mode.
+ */
+ sparse_index : 1;
struct hashmap name_hash;
struct hashmap dir_hash;
struct object_id oid;
@@ -722,6 +731,8 @@ int read_index_from(struct index_state *, const char *path,
const char *gitdir);
int is_index_unborn(struct index_state *);
+void ensure_full_index(struct index_state *istate);
+
/* For use with `write_locked_index()`. */
#define COMMIT_LOCK (1 << 0)
#define SKIP_IF_UNCHANGED (1 << 1)