From f8adbec9feaa7a1ab9814db1115826e87033712e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nguy=E1=BB=85n=20Th=C3=A1i=20Ng=E1=BB=8Dc=20Duy?= Date: Thu, 24 Jan 2019 15:29:12 +0700 Subject: cache.h: flip NO_THE_INDEX_COMPATIBILITY_MACROS switch MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Signed-off-by: Junio C Hamano --- t/helper/test-dump-fsmonitor.c | 4 ++-- t/helper/test-dump-untracked-cache.c | 1 + t/helper/test-tool.h | 1 + 3 files changed, 4 insertions(+), 2 deletions(-) (limited to 't/helper') diff --git a/t/helper/test-dump-fsmonitor.c b/t/helper/test-dump-fsmonitor.c index 08e3684aff..2786f47088 100644 --- a/t/helper/test-dump-fsmonitor.c +++ b/t/helper/test-dump-fsmonitor.c @@ -3,11 +3,11 @@ int cmd__dump_fsmonitor(int ac, const char **av) { - struct index_state *istate = &the_index; + struct index_state *istate = the_repository->index; int i; setup_git_directory(); - if (do_read_index(istate, get_index_file(), 0) < 0) + if (do_read_index(istate, the_repository->index_file, 0) < 0) die("unable to read index file"); if (!istate->fsmonitor_last_update) { printf("no fsmonitor\n"); diff --git a/t/helper/test-dump-untracked-cache.c b/t/helper/test-dump-untracked-cache.c index 52870ebbb3..cf0f2c7228 100644 --- a/t/helper/test-dump-untracked-cache.c +++ b/t/helper/test-dump-untracked-cache.c @@ -1,3 +1,4 @@ +#define USE_THE_INDEX_COMPATIBILITY_MACROS #include "test-tool.h" #include "cache.h" #include "dir.h" diff --git a/t/helper/test-tool.h b/t/helper/test-tool.h index 042f12464b..f4fb3b9861 100644 --- a/t/helper/test-tool.h +++ b/t/helper/test-tool.h @@ -1,6 +1,7 @@ #ifndef TEST_TOOL_H #define TEST_TOOL_H +#define USE_THE_INDEX_COMPATIBILITY_MACROS #include "git-compat-util.h" int cmd__chmtime(int argc, const char **argv); -- cgit v1.2.3