Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorElijah Newren <newren@gmail.com>2023-02-24 03:09:23 +0300
committerJunio C Hamano <gitster@pobox.com>2023-02-24 04:25:28 +0300
commit15db4e7f4ac20cc41902a2479c7784fff8edf2e9 (patch)
tree041fdf546a331a01315c23ea633d1bd5a1ac99a2 /t
parentba3d1c73daa02152acf4729d45ca7fe4d71d5747 (diff)
treewide: remove unnecessary cache.h includes in source files
We had several C files include cache.h unnecessarily. Replace those with an include of "git-compat-util.h" instead. Much like the previous commit, these have all been verified via both ensuring that gcc -E $SOURCE_FILE | grep '"cache.h"' found no hits and that make DEVELOPER=1 ${OBJECT_FILE_FOR_SOURCE_FILE} successfully compiles without warnings. Signed-off-by: Elijah Newren <newren@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't')
-rw-r--r--t/helper/test-crontab.c1
-rw-r--r--t/helper/test-ctype.c1
-rw-r--r--t/helper/test-json-writer.c1
-rw-r--r--t/helper/test-pcre2-config.c1
-rw-r--r--t/helper/test-prio-queue.c1
-rw-r--r--t/helper/test-run-command.c2
-rw-r--r--t/helper/test-sigchain.c1
-rw-r--r--t/helper/test-simple-ipc.c3
-rw-r--r--t/helper/test-wildmatch.c1
9 files changed, 2 insertions, 10 deletions
diff --git a/t/helper/test-crontab.c b/t/helper/test-crontab.c
index e6c1b1e22b..597027a96e 100644
--- a/t/helper/test-crontab.c
+++ b/t/helper/test-crontab.c
@@ -1,5 +1,4 @@
#include "test-tool.h"
-#include "cache.h"
/*
* Usage: test-tool crontab <file> -l|<input>
diff --git a/t/helper/test-ctype.c b/t/helper/test-ctype.c
index 92c4c2313e..d6c1a2ed09 100644
--- a/t/helper/test-ctype.c
+++ b/t/helper/test-ctype.c
@@ -1,5 +1,4 @@
#include "test-tool.h"
-#include "cache.h"
static int rc;
diff --git a/t/helper/test-json-writer.c b/t/helper/test-json-writer.c
index 8c3edacc00..86887f5320 100644
--- a/t/helper/test-json-writer.c
+++ b/t/helper/test-json-writer.c
@@ -1,5 +1,4 @@
#include "test-tool.h"
-#include "cache.h"
#include "json-writer.h"
static const char *expect_obj1 = "{\"a\":\"abc\",\"b\":42,\"c\":true}";
diff --git a/t/helper/test-pcre2-config.c b/t/helper/test-pcre2-config.c
index 5258fdddba..5d0b2a2e10 100644
--- a/t/helper/test-pcre2-config.c
+++ b/t/helper/test-pcre2-config.c
@@ -1,5 +1,4 @@
#include "test-tool.h"
-#include "cache.h"
#include "grep.h"
int cmd__pcre2_config(int argc, const char **argv)
diff --git a/t/helper/test-prio-queue.c b/t/helper/test-prio-queue.c
index 133b5e6f4a..ac4c65d705 100644
--- a/t/helper/test-prio-queue.c
+++ b/t/helper/test-prio-queue.c
@@ -1,5 +1,4 @@
#include "test-tool.h"
-#include "cache.h"
#include "prio-queue.h"
static int intcmp(const void *va, const void *vb, void *data)
diff --git a/t/helper/test-run-command.c b/t/helper/test-run-command.c
index 3ecb830f4a..67b42ef50e 100644
--- a/t/helper/test-run-command.c
+++ b/t/helper/test-run-command.c
@@ -9,8 +9,6 @@
*/
#include "test-tool.h"
-#include "git-compat-util.h"
-#include "cache.h"
#include "run-command.h"
#include "strvec.h"
#include "strbuf.h"
diff --git a/t/helper/test-sigchain.c b/t/helper/test-sigchain.c
index d013bccdda..d1cf7377b7 100644
--- a/t/helper/test-sigchain.c
+++ b/t/helper/test-sigchain.c
@@ -1,5 +1,4 @@
#include "test-tool.h"
-#include "cache.h"
#include "sigchain.h"
#define X(f) \
diff --git a/t/helper/test-simple-ipc.c b/t/helper/test-simple-ipc.c
index 28365ff85b..3d1436da59 100644
--- a/t/helper/test-simple-ipc.c
+++ b/t/helper/test-simple-ipc.c
@@ -3,13 +3,14 @@
*/
#include "test-tool.h"
-#include "cache.h"
+#include "gettext.h"
#include "strbuf.h"
#include "simple-ipc.h"
#include "parse-options.h"
#include "thread-utils.h"
#include "strvec.h"
#include "run-command.h"
+#include "trace2.h"
#ifndef SUPPORTS_SIMPLE_IPC
int cmd__simple_ipc(int argc, const char **argv)
diff --git a/t/helper/test-wildmatch.c b/t/helper/test-wildmatch.c
index 2c103d1824..a95bb4da9b 100644
--- a/t/helper/test-wildmatch.c
+++ b/t/helper/test-wildmatch.c
@@ -1,5 +1,4 @@
#include "test-tool.h"
-#include "cache.h"
int cmd__wildmatch(int argc, const char **argv)
{