cache.h & test-tool.h: add & use "USE_THE_INDEX_VARIABLE"

In a preceding commit we fully applied the
"index-compatibility.pending.cocci" rule to "t/helper/*".

Let's now stop defining "USE_THE_INDEX_COMPATIBILITY_MACROS" in
test-tool.h itself, and instead instead define
"USE_THE_INDEX_VARIABLE" in the individual test helpers that need
it. This mirrors how we do the same thing in the "builtin/" directory.

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Ævar Arnfjörð Bjarmason 2022-11-19 14:07:37 +01:00 committed by Junio C Hamano
parent 666f53eb43
commit bdafeae0b9
10 changed files with 9 additions and 3 deletions

View File

@ -1,3 +1,4 @@
#define USE_THE_INDEX_VARIABLE
#include "test-tool.h"
#include "cache.h"
#include "tree.h"

View File

@ -1,3 +1,4 @@
#define USE_THE_INDEX_VARIABLE
#include "test-tool.h"
#include "cache.h"
#include "tree.h"

View File

@ -1,3 +1,4 @@
#define USE_THE_INDEX_VARIABLE
#include "test-tool.h"
#include "cache.h"
#include "split-index.h"

View File

@ -1,4 +1,4 @@
#define USE_THE_INDEX_COMPATIBILITY_MACROS
#define USE_THE_INDEX_VARIABLE
#include "test-tool.h"
#include "cache.h"
#include "dir.h"

View File

@ -10,7 +10,7 @@
* refactoring is the better route).
*/
#define USE_THE_INDEX_COMPATIBILITY_MACROS
#define USE_THE_INDEX_VARIABLE
#include "test-tool.h"
#include "cache-tree.h"

View File

@ -1,3 +1,4 @@
#define USE_THE_INDEX_VARIABLE
#include "test-tool.h"
#include "cache.h"
#include "parse-options.h"

View File

@ -1,3 +1,4 @@
#define USE_THE_INDEX_VARIABLE
#include "test-tool.h"
#include "cache.h"
#include "config.h"

View File

@ -1,3 +1,4 @@
#define USE_THE_INDEX_VARIABLE
#include "test-tool.h"
#include "cache.h"
#include "lockfile.h"

View File

@ -1,7 +1,6 @@
#ifndef TEST_TOOL_H
#define TEST_TOOL_H
#define USE_THE_INDEX_COMPATIBILITY_MACROS
#include "git-compat-util.h"
int cmd__advise_if_enabled(int argc, const char **argv);

View File

@ -1,3 +1,4 @@
#define USE_THE_INDEX_VARIABLE
#include "test-tool.h"
#include "cache.h"
#include "lockfile.h"