summary refs log tree commit diff
path: root/repository.c
diff options
context:
space:
mode:
authorNguyễn Thái Ngọc Duy <pclouds@gmail.com>2019-01-24 15:29:12 +0700
committerJunio C Hamano <gitster@pobox.com>2019-01-24 11:55:06 -0800
commitf8adbec9feaa7a1ab9814db1115826e87033712e (patch)
tree5049172d68705c068c5cc0ea40a3f6afcf443fa5 /repository.c
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 'repository.c')
-rw-r--r--repository.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/repository.c b/repository.c
index 9411c4baee..36a3b52d70 100644
--- a/repository.c
+++ b/repository.c
@@ -1,3 +1,8 @@
+/*
+ * not really _using_ the compat macros, just make sure the_index
+ * declaration matches the definition in this file.
+ */
+#define USE_THE_INDEX_COMPATIBILITY_MACROS
 #include "cache.h"
 #include "repository.h"
 #include "object-store.h"
@@ -9,6 +14,7 @@
 /* The main repository */
 static struct repository the_repo;
 struct repository *the_repository;
+struct index_state the_index;
 
 void initialize_the_repository(void)
 {