From: "Elijah Newren via GitGitGadget" <gitgitgadget@gmail.com>
To: git@vger.kernel.org
Cc: Elijah Newren <newren@gmail.com>, Elijah Newren <newren@gmail.com>
Subject: [PATCH 14/16] treewide: remove cache.h inclusion due to setup.h changes
Date: Sun, 19 Mar 2023 06:28:00 +0000 [thread overview]
Message-ID: <0e84202da90e7edb90f6d7cc62aae4b10c86bbe8.1679207285.git.gitgitgadget@gmail.com> (raw)
In-Reply-To: <pull.1493.git.1679207282.gitgitgadget@gmail.com>
From: Elijah Newren <newren@gmail.com>
By moving several declarations to setup.h, the previous patch made it
possible to remove the include of cache.h in several source files. Do
so.
Signed-off-by: Elijah Newren <newren@gmail.com>
---
line-log.c | 1 -
path.c | 2 +-
t/helper/test-advise.c | 1 -
t/helper/test-bloom.c | 3 +--
t/helper/test-config.c | 1 -
t/helper/test-pack-mtimes.c | 1 -
t/helper/test-partial-clone.c | 3 +--
t/helper/test-proc-receive.c | 3 +--
t/helper/test-read-graph.c | 1 -
t/helper/test-ref-store.c | 1 -
t/helper/test-repository.c | 1 -
t/helper/test-revision-walking.c | 1 -
t/helper/test-serve-v2.c | 1 -
t/helper/test-submodule-nested-repo-config.c | 1 -
t/helper/test-submodule.c | 1 -
t/helper/test-subprocess.c | 1 -
t/helper/test-userdiff.c | 1 -
worktree.c | 2 +-
18 files changed, 5 insertions(+), 21 deletions(-)
diff --git a/line-log.c b/line-log.c
index 84c8093c517..10c19daec4a 100644
--- a/line-log.c
+++ b/line-log.c
@@ -1,7 +1,6 @@
#include "git-compat-util.h"
#include "alloc.h"
#include "line-range.h"
-#include "cache.h"
#include "hex.h"
#include "tag.h"
#include "blob.h"
diff --git a/path.c b/path.c
index a1702434979..dff215ac693 100644
--- a/path.c
+++ b/path.c
@@ -1,7 +1,7 @@
/*
* Utilities for paths and pathnames
*/
-#include "cache.h"
+#include "git-compat-util.h"
#include "abspath.h"
#include "environment.h"
#include "gettext.h"
diff --git a/t/helper/test-advise.c b/t/helper/test-advise.c
index 4e6ed30afa1..8a3fd0009a0 100644
--- a/t/helper/test-advise.c
+++ b/t/helper/test-advise.c
@@ -1,5 +1,4 @@
#include "test-tool.h"
-#include "cache.h"
#include "advice.h"
#include "config.h"
#include "setup.h"
diff --git a/t/helper/test-bloom.c b/t/helper/test-bloom.c
index e5754b8da62..d2b30d644da 100644
--- a/t/helper/test-bloom.c
+++ b/t/helper/test-bloom.c
@@ -1,7 +1,6 @@
-#include "cache.h"
+#include "test-tool.h"
#include "bloom.h"
#include "hex.h"
-#include "test-tool.h"
#include "commit.h"
#include "setup.h"
diff --git a/t/helper/test-config.c b/t/helper/test-config.c
index 5877188f3ad..32d170ec303 100644
--- a/t/helper/test-config.c
+++ b/t/helper/test-config.c
@@ -1,5 +1,4 @@
#include "test-tool.h"
-#include "cache.h"
#include "config.h"
#include "setup.h"
#include "string-list.h"
diff --git a/t/helper/test-pack-mtimes.c b/t/helper/test-pack-mtimes.c
index 75ca1505a37..0f3fbeec532 100644
--- a/t/helper/test-pack-mtimes.c
+++ b/t/helper/test-pack-mtimes.c
@@ -1,5 +1,4 @@
#include "test-tool.h"
-#include "cache.h"
#include "hex.h"
#include "strbuf.h"
#include "object-store.h"
diff --git a/t/helper/test-partial-clone.c b/t/helper/test-partial-clone.c
index cce496944ac..362bd64a4c2 100644
--- a/t/helper/test-partial-clone.c
+++ b/t/helper/test-partial-clone.c
@@ -1,6 +1,5 @@
-#include "cache.h"
-#include "hex.h"
#include "test-tool.h"
+#include "hex.h"
#include "repository.h"
#include "object-store.h"
#include "setup.h"
diff --git a/t/helper/test-proc-receive.c b/t/helper/test-proc-receive.c
index 7c8de7b562a..f30022d2225 100644
--- a/t/helper/test-proc-receive.c
+++ b/t/helper/test-proc-receive.c
@@ -1,11 +1,10 @@
-#include "cache.h"
+#include "test-tool.h"
#include "connect.h"
#include "hex.h"
#include "parse-options.h"
#include "pkt-line.h"
#include "setup.h"
#include "sigchain.h"
-#include "test-tool.h"
static const char *proc_receive_usage[] = {
"test-tool proc-receive [<options>]",
diff --git a/t/helper/test-read-graph.c b/t/helper/test-read-graph.c
index e21b0805f3c..78965a6ebdc 100644
--- a/t/helper/test-read-graph.c
+++ b/t/helper/test-read-graph.c
@@ -1,5 +1,4 @@
#include "test-tool.h"
-#include "cache.h"
#include "commit-graph.h"
#include "repository.h"
#include "object-store.h"
diff --git a/t/helper/test-ref-store.c b/t/helper/test-ref-store.c
index 8717b95e84f..d1192c8c039 100644
--- a/t/helper/test-ref-store.c
+++ b/t/helper/test-ref-store.c
@@ -1,5 +1,4 @@
#include "test-tool.h"
-#include "cache.h"
#include "hex.h"
#include "refs.h"
#include "setup.h"
diff --git a/t/helper/test-repository.c b/t/helper/test-repository.c
index 6774f6245f0..bafd2a5bf95 100644
--- a/t/helper/test-repository.c
+++ b/t/helper/test-repository.c
@@ -1,5 +1,4 @@
#include "test-tool.h"
-#include "cache.h"
#include "commit-graph.h"
#include "commit.h"
#include "config.h"
diff --git a/t/helper/test-revision-walking.c b/t/helper/test-revision-walking.c
index f2df4334063..7750afb2866 100644
--- a/t/helper/test-revision-walking.c
+++ b/t/helper/test-revision-walking.c
@@ -9,7 +9,6 @@
*/
#include "test-tool.h"
-#include "cache.h"
#include "commit.h"
#include "diff.h"
#include "revision.h"
diff --git a/t/helper/test-serve-v2.c b/t/helper/test-serve-v2.c
index 7d590ab7227..054cbcf5d83 100644
--- a/t/helper/test-serve-v2.c
+++ b/t/helper/test-serve-v2.c
@@ -1,5 +1,4 @@
#include "test-tool.h"
-#include "cache.h"
#include "gettext.h"
#include "parse-options.h"
#include "serve.h"
diff --git a/t/helper/test-submodule-nested-repo-config.c b/t/helper/test-submodule-nested-repo-config.c
index aaffd422d6e..d31f5e48ab5 100644
--- a/t/helper/test-submodule-nested-repo-config.c
+++ b/t/helper/test-submodule-nested-repo-config.c
@@ -1,5 +1,4 @@
#include "test-tool.h"
-#include "cache.h"
#include "setup.h"
#include "submodule-config.h"
diff --git a/t/helper/test-submodule.c b/t/helper/test-submodule.c
index f18ca46dce4..0e34581b209 100644
--- a/t/helper/test-submodule.c
+++ b/t/helper/test-submodule.c
@@ -1,6 +1,5 @@
#include "test-tool.h"
#include "test-tool-utils.h"
-#include "cache.h"
#include "parse-options.h"
#include "remote.h"
#include "setup.h"
diff --git a/t/helper/test-subprocess.c b/t/helper/test-subprocess.c
index 65a355cc590..c344f1694df 100644
--- a/t/helper/test-subprocess.c
+++ b/t/helper/test-subprocess.c
@@ -1,5 +1,4 @@
#include "test-tool.h"
-#include "cache.h"
#include "run-command.h"
#include "setup.h"
diff --git a/t/helper/test-userdiff.c b/t/helper/test-userdiff.c
index 0cd7ee12b7e..680124a6760 100644
--- a/t/helper/test-userdiff.c
+++ b/t/helper/test-userdiff.c
@@ -1,5 +1,4 @@
#include "test-tool.h"
-#include "cache.h"
#include "setup.h"
#include "userdiff.h"
#include "config.h"
diff --git a/worktree.c b/worktree.c
index edef9e161dc..f33826f0a0b 100644
--- a/worktree.c
+++ b/worktree.c
@@ -1,4 +1,4 @@
-#include "cache.h"
+#include "git-compat-util.h"
#include "abspath.h"
#include "alloc.h"
#include "environment.h"
--
gitgitgadget
next prev parent reply other threads:[~2023-03-19 6:28 UTC|newest]
Thread overview: 37+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-19 6:27 [PATCH 00/16] Header cleanups Elijah Newren via GitGitGadget
2023-03-19 6:27 ` [PATCH 01/16] treewide: remove unnecessary cache.h inclusion from a few headers Elijah Newren via GitGitGadget
2023-03-19 6:27 ` [PATCH 02/16] treewide: be explicit about dependence on gettext.h Elijah Newren via GitGitGadget
2023-03-19 6:27 ` [PATCH 03/16] treewide: remove unnecessary inclusion of gettext.h Elijah Newren via GitGitGadget
2023-03-19 6:27 ` [PATCH 04/16] treewide: remove unnecessary cache.h inclusion from several sources Elijah Newren via GitGitGadget
2023-03-19 6:27 ` [PATCH 05/16] environment: move comment_line_char from cache.h Elijah Newren via GitGitGadget
2023-03-19 6:27 ` [PATCH 06/16] abspath.h: move absolute path functions " Elijah Newren via GitGitGadget
2023-03-19 6:27 ` [PATCH 07/16] cache.h: remove expand_user_path() Elijah Newren via GitGitGadget
2023-03-19 6:27 ` [PATCH 08/16] path.h: move function declarations for path.c functions from cache.h Elijah Newren via GitGitGadget
2023-03-19 6:27 ` [PATCH 09/16] wrapper.h: move declarations for wrapper.c " Elijah Newren via GitGitGadget
2023-03-19 6:27 ` [PATCH 10/16] treewide: remove unnecessary includes of cache.h Elijah Newren via GitGitGadget
2023-03-19 6:27 ` [PATCH 11/16] environment.h: move declarations for environment.c functions from cache.h Elijah Newren via GitGitGadget
2023-03-19 6:27 ` [PATCH 12/16] treewide: remove cache.h inclusion due to environment.h changes Elijah Newren via GitGitGadget
2023-03-19 6:27 ` [PATCH 13/16] setup.h: move declarations for setup.c functions from cache.h Elijah Newren via GitGitGadget
2023-03-19 6:28 ` Elijah Newren via GitGitGadget [this message]
2023-03-19 6:28 ` [PATCH 15/16] write-or-die.h: move declarations for write-or-die.c " Elijah Newren via GitGitGadget
2023-03-19 6:28 ` [PATCH 16/16] csum-file.h: remove unnecessary inclusion of cache.h Elijah Newren via GitGitGadget
2023-03-20 9:58 ` [PATCH 00/16] Header cleanups Ævar Arnfjörð Bjarmason
2023-03-20 16:18 ` Elijah Newren
2023-03-21 6:25 ` [PATCH v2 " Elijah Newren via GitGitGadget
2023-03-21 6:25 ` [PATCH v2 01/16] treewide: remove unnecessary cache.h inclusion from a few headers Elijah Newren via GitGitGadget
2023-03-21 6:25 ` [PATCH v2 02/16] treewide: be explicit about dependence on gettext.h Elijah Newren via GitGitGadget
2023-03-21 6:25 ` [PATCH v2 03/16] treewide: remove unnecessary inclusion of gettext.h Elijah Newren via GitGitGadget
2023-03-21 6:25 ` [PATCH v2 04/16] treewide: remove unnecessary cache.h inclusion from several sources Elijah Newren via GitGitGadget
2023-03-21 6:25 ` [PATCH v2 05/16] environment: move comment_line_char from cache.h Elijah Newren via GitGitGadget
2023-03-21 6:25 ` [PATCH v2 06/16] abspath.h: move absolute path functions " Elijah Newren via GitGitGadget
2023-03-21 6:25 ` [PATCH v2 07/16] cache.h: remove expand_user_path() Elijah Newren via GitGitGadget
2023-03-21 6:26 ` [PATCH v2 08/16] path.h: move function declarations for path.c functions from cache.h Elijah Newren via GitGitGadget
2023-03-21 6:26 ` [PATCH v2 09/16] wrapper.h: move declarations for wrapper.c " Elijah Newren via GitGitGadget
2023-03-21 6:26 ` [PATCH v2 10/16] treewide: remove unnecessary includes of cache.h Elijah Newren via GitGitGadget
2023-03-21 6:26 ` [PATCH v2 11/16] environment.h: move declarations for environment.c functions from cache.h Elijah Newren via GitGitGadget
2023-03-21 6:26 ` [PATCH v2 12/16] treewide: remove cache.h inclusion due to environment.h changes Elijah Newren via GitGitGadget
2023-03-21 6:26 ` [PATCH v2 13/16] setup.h: move declarations for setup.c functions from cache.h Elijah Newren via GitGitGadget
2023-03-21 6:26 ` [PATCH v2 14/16] treewide: remove cache.h inclusion due to setup.h changes Elijah Newren via GitGitGadget
2023-03-21 6:26 ` [PATCH v2 15/16] write-or-die.h: move declarations for write-or-die.c functions from cache.h Elijah Newren via GitGitGadget
2023-03-21 6:26 ` [PATCH v2 16/16] csum-file.h: remove unnecessary inclusion of cache.h Elijah Newren via GitGitGadget
2023-03-21 21:56 ` [PATCH v2 00/16] Header cleanups Jonathan Tan
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=0e84202da90e7edb90f6d7cc62aae4b10c86bbe8.1679207285.git.gitgitgadget@gmail.com \
--to=gitgitgadget@gmail.com \
--cc=git@vger.kernel.org \
--cc=newren@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).