Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNguyễn Thái Ngọc Duy <pclouds@gmail.com>2019-01-24 11:29:12 +0300
committerJunio C Hamano <gitster@pobox.com>2019-01-24 22:55:06 +0300
commitf8adbec9feaa7a1ab9814db1115826e87033712e (patch)
tree5049172d68705c068c5cc0ea40a3f6afcf443fa5 /cache.h
parent150fe065f71778a6591566d6fde65171569a4b7a (diff)
cache.h: flip NO_THE_INDEX_COMPATIBILITY_MACROS switch
By default, index compat macros are off from now on, because they could hide the_index dependency. Only those in builtin can use it. Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'cache.h')
-rw-r--r--cache.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/cache.h b/cache.h
index 326e73f391..962eb127d3 100644
--- a/cache.h
+++ b/cache.h
@@ -338,8 +338,6 @@ struct index_state {
struct mem_pool *ce_mem_pool;
};
-extern struct index_state the_index;
-
/* Name hashing */
extern int test_lazy_init_name_hash(struct index_state *istate, int try_threaded);
extern void add_name_hash(struct index_state *istate, struct cache_entry *ce);
@@ -401,7 +399,9 @@ struct cache_entry *dup_cache_entry(const struct cache_entry *ce, struct index_s
*/
void validate_cache_entries(const struct index_state *istate);
-#ifndef NO_THE_INDEX_COMPATIBILITY_MACROS
+#ifdef USE_THE_INDEX_COMPATIBILITY_MACROS
+extern struct index_state the_index;
+
#define active_cache (the_index.cache)
#define active_nr (the_index.cache_nr)
#define active_alloc (the_index.cache_alloc)