aboutsummaryrefslogtreecommitdiffstats
path: root/cache.h
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2018-03-22 14:24:10 -0700
committerJunio C Hamano <gitster@pobox.com>2018-03-22 14:24:10 -0700
commitb0e0fc267bfb270b0ccf48ff17179c9c315dc2a9 (patch)
treeb2fe4a33f8ecaf45c88b837551d8f57b2d1d72ec /cache.h
parent7e44d8055c76d4e8291d6dae289ebccab1e72aab (diff)
parentae59a4e44f359f74d0fede109c29bb53f726209b (diff)
downloadgit-b0e0fc267bfb270b0ccf48ff17179c9c315dc2a9.tar.gz
Merge branch 'tg/split-index-fixes' into maint
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 d8b975a571..fd755c32cf 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 *);