summaryrefslogtreecommitdiff
path: root/cache.h
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2018-02-13 21:39:12 (GMT)
committerJunio C Hamano <gitster@pobox.com>2018-02-13 21:39:13 (GMT)
commite75c862125f219c983cd2980d1b33ec09a3c34b9 (patch)
tree716c9f3eec268b391e30360abf39ee7700dd40a4 /cache.h
parent73df1b34218b1bce579a3ed90166db9df43d9e67 (diff)
parentae59a4e44f359f74d0fede109c29bb53f726209b (diff)
downloadgit-e75c862125f219c983cd2980d1b33ec09a3c34b9.zip
git-e75c862125f219c983cd2980d1b33ec09a3c34b9.tar.gz
git-e75c862125f219c983cd2980d1b33ec09a3c34b9.tar.bz2
Merge branch 'tg/split-index-fixes'
The split-index mode had a few corner case bugs fixed. * tg/split-index-fixes: travis: run tests with GIT_TEST_SPLIT_INDEX split-index: don't write cache tree with null oid entries read-cache: fix reading the shared index for other repos
Diffstat (limited to 'cache.h')
-rw-r--r--cache.h8
1 files changed, 5 insertions, 3 deletions
diff --git a/cache.h b/cache.h
index 8cdcee5..9cac7bb 100644
--- a/cache.h
+++ b/cache.h
@@ -345,7 +345,8 @@ struct index_state {
struct split_index *split_index;
struct cache_time timestamp;
unsigned name_hash_initialized : 1,
- initialized : 1;
+ initialized : 1,
+ drop_cache_tree : 1;
struct hashmap name_hash;
struct hashmap dir_hash;
unsigned char sha1[20];
@@ -371,7 +372,7 @@ extern void free_name_hash(struct index_state *istate);
#define active_cache_tree (the_index.cache_tree)
#define read_cache() read_index(&the_index)
-#define read_cache_from(path) read_index_from(&the_index, (path))
+#define read_cache_from(path) read_index_from(&the_index, (path), (get_git_dir()))
#define read_cache_preload(pathspec) read_index_preload(&the_index, (pathspec))
#define is_cache_unborn() is_index_unborn(&the_index)
#define read_cache_unmerged() read_index_unmerged(&the_index)
@@ -616,7 +617,8 @@ extern int read_index(struct index_state *);
extern int read_index_preload(struct index_state *, const struct pathspec *pathspec);
extern int do_read_index(struct index_state *istate, const char *path,
int must_exist); /* for testting only! */
-extern int read_index_from(struct index_state *, const char *path);
+extern int read_index_from(struct index_state *, const char *path,
+ const char *gitdir);
extern int is_index_unborn(struct index_state *);
extern int read_index_unmerged(struct index_state *);