aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorÆvar Arnfjörð Bjarmason <avarab@gmail.com>2022-11-19 14:07:37 +0100
committerJunio C Hamano <gitster@pobox.com>2022-11-21 12:06:15 +0900
commitbdafeae0b9cdbf5b33c116564ffec93389cc5d37 (patch)
treea9b96e50d2ed56964595b64afb87909112e78589
parent{builtin/*,repository}.c: add & use "USE_THE_INDEX_VARIABLE" (diff)
downloadgit-bdafeae0b9cdbf5b33c116564ffec93389cc5d37.tar.gz
git-bdafeae0b9cdbf5b33c116564ffec93389cc5d37.zip
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>
-rw-r--r--t/helper/test-cache-tree.c1
-rw-r--r--t/helper/test-dump-cache-tree.c1
-rw-r--r--t/helper/test-dump-split-index.c1
-rw-r--r--t/helper/test-dump-untracked-cache.c2
-rw-r--r--t/helper/test-fast-rebase.c2
-rw-r--r--t/helper/test-lazy-init-name-hash.c1
-rw-r--r--t/helper/test-read-cache.c1
-rw-r--r--t/helper/test-scrap-cache-tree.c1
-rw-r--r--t/helper/test-tool.h1
-rw-r--r--t/helper/test-write-cache.c1
10 files changed, 9 insertions, 3 deletions
diff --git a/t/helper/test-cache-tree.c b/t/helper/test-cache-tree.c
index 5514afdfe7..9159a17301 100644
--- a/t/helper/test-cache-tree.c
+++ b/t/helper/test-cache-tree.c
@@ -1,3 +1,4 @@
+#define USE_THE_INDEX_VARIABLE
#include "test-tool.h"
#include "cache.h"
#include "tree.h"
diff --git a/t/helper/test-dump-cache-tree.c b/t/helper/test-dump-cache-tree.c
index 4bf8bc3df6..454f17b1a0 100644
--- a/t/helper/test-dump-cache-tree.c
+++ b/t/helper/test-dump-cache-tree.c
@@ -1,3 +1,4 @@
+#define USE_THE_INDEX_VARIABLE
#include "test-tool.h"
#include "cache.h"
#include "tree.h"
diff --git a/t/helper/test-dump-split-index.c b/t/helper/test-dump-split-index.c
index a209880eb3..0ea97b8407 100644
--- a/t/helper/test-dump-split-index.c
+++ b/t/helper/test-dump-split-index.c
@@ -1,3 +1,4 @@
+#define USE_THE_INDEX_VARIABLE
#include "test-tool.h"
#include "cache.h"
#include "split-index.h"
diff --git a/t/helper/test-dump-untracked-cache.c b/t/helper/test-dump-untracked-cache.c
index ffe34736e5..6d53683f13 100644
--- a/t/helper/test-dump-untracked-cache.c
+++ b/t/helper/test-dump-untracked-cache.c
@@ -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"
diff --git a/t/helper/test-fast-rebase.c b/t/helper/test-fast-rebase.c
index 9def2ba688..efc82dd80c 100644
--- a/t/helper/test-fast-rebase.c
+++ b/t/helper/test-fast-rebase.c
@@ -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"
diff --git a/t/helper/test-lazy-init-name-hash.c b/t/helper/test-lazy-init-name-hash.c
index 7e8723a190..ab86c14c8b 100644
--- a/t/helper/test-lazy-init-name-hash.c
+++ b/t/helper/test-lazy-init-name-hash.c
@@ -1,3 +1,4 @@
+#define USE_THE_INDEX_VARIABLE
#include "test-tool.h"
#include "cache.h"
#include "parse-options.h"
diff --git a/t/helper/test-read-cache.c b/t/helper/test-read-cache.c
index a089be9104..23e9e27109 100644
--- a/t/helper/test-read-cache.c
+++ b/t/helper/test-read-cache.c
@@ -1,3 +1,4 @@
+#define USE_THE_INDEX_VARIABLE
#include "test-tool.h"
#include "cache.h"
#include "config.h"
diff --git a/t/helper/test-scrap-cache-tree.c b/t/helper/test-scrap-cache-tree.c
index 9206dee1fd..a26107ed70 100644
--- a/t/helper/test-scrap-cache-tree.c
+++ b/t/helper/test-scrap-cache-tree.c
@@ -1,3 +1,4 @@
+#define USE_THE_INDEX_VARIABLE
#include "test-tool.h"
#include "cache.h"
#include "lockfile.h"
diff --git a/t/helper/test-tool.h b/t/helper/test-tool.h
index da7cd6351a..2e20a16eb8 100644
--- a/t/helper/test-tool.h
+++ b/t/helper/test-tool.h
@@ -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);
diff --git a/t/helper/test-write-cache.c b/t/helper/test-write-cache.c
index 66287d6d47..7d45cd61e8 100644
--- a/t/helper/test-write-cache.c
+++ b/t/helper/test-write-cache.c
@@ -1,3 +1,4 @@
+#define USE_THE_INDEX_VARIABLE
#include "test-tool.h"
#include "cache.h"
#include "lockfile.h"