]> git.ipfire.org Git - thirdparty/git.git/commitdiff
cache.h & test-tool.h: add & use "USE_THE_INDEX_VARIABLE"
authorÆvar Arnfjörð Bjarmason <avarab@gmail.com>
Sat, 19 Nov 2022 13:07:37 +0000 (14:07 +0100)
committerJunio C Hamano <gitster@pobox.com>
Mon, 21 Nov 2022 03:06:15 +0000 (12:06 +0900)
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>
t/helper/test-cache-tree.c
t/helper/test-dump-cache-tree.c
t/helper/test-dump-split-index.c
t/helper/test-dump-untracked-cache.c
t/helper/test-fast-rebase.c
t/helper/test-lazy-init-name-hash.c
t/helper/test-read-cache.c
t/helper/test-scrap-cache-tree.c
t/helper/test-tool.h
t/helper/test-write-cache.c

index 5514afdfe7a9ecb6a2cf9e344fc6840d30b18459..9159a173015cd6efca2f686745cf765e9bdfe58f 100644 (file)
@@ -1,3 +1,4 @@
+#define USE_THE_INDEX_VARIABLE
 #include "test-tool.h"
 #include "cache.h"
 #include "tree.h"
index 4bf8bc3df6e0e95349c21e49ec3b5bac88ed44d4..454f17b1a0c1cceadffd6293db43790dcf42972a 100644 (file)
@@ -1,3 +1,4 @@
+#define USE_THE_INDEX_VARIABLE
 #include "test-tool.h"
 #include "cache.h"
 #include "tree.h"
index a209880eb37a2ce4de4b9f916ec3dbf52b987957..0ea97b8407296a3615ab786e9458ff9bbf638000 100644 (file)
@@ -1,3 +1,4 @@
+#define USE_THE_INDEX_VARIABLE
 #include "test-tool.h"
 #include "cache.h"
 #include "split-index.h"
index ffe34736e532c4fd2d9aee6deb9f028d627f6e3b..6d53683f13b04c2c89680408f3e348cf97043ffd 100644 (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"
index 9def2ba68890b8d63f9e5315515d07d4ff05b8f8..efc82dd80c5b5711ecb4947b3c082433845e1e50 100644 (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"
index 7e8723a1900b73549082cbddf7a2796df5b5f8f6..ab86c14c8ba56b513ea302842ad9fbf638507404 100644 (file)
@@ -1,3 +1,4 @@
+#define USE_THE_INDEX_VARIABLE
 #include "test-tool.h"
 #include "cache.h"
 #include "parse-options.h"
index a089be9104c8561a396a011ff4333f4f38cd0d73..23e9e27109faa2acac0bd2804e1143efc7c8971b 100644 (file)
@@ -1,3 +1,4 @@
+#define USE_THE_INDEX_VARIABLE
 #include "test-tool.h"
 #include "cache.h"
 #include "config.h"
index 9206dee1fd23a2c009a9cc08e5e1b05603e370d5..a26107ed70ac023da79a573bf0d87cdad95016d0 100644 (file)
@@ -1,3 +1,4 @@
+#define USE_THE_INDEX_VARIABLE
 #include "test-tool.h"
 #include "cache.h"
 #include "lockfile.h"
index da7cd6351a6ea32a222f91229874016226e066de..2e20a16eb82a115c09071b6a08887a4d11ab0761 100644 (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);
index 66287d6d47da267d210f694eaac3f814acbb0464..7d45cd61e820305615f4c53157e39074adcb0a50 100644 (file)
@@ -1,3 +1,4 @@
+#define USE_THE_INDEX_VARIABLE
 #include "test-tool.h"
 #include "cache.h"
 #include "lockfile.h"