git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
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 16/16] csum-file.h: remove unnecessary inclusion of cache.h
Date: Sun, 19 Mar 2023 06:28:02 +0000	[thread overview]
Message-ID: <38af06f55bc8fd87af580aa94b8a83cdc5b1fd4d.1679207286.git.gitgitgadget@gmail.com> (raw)
In-Reply-To: <pull.1493.git.1679207282.gitgitgadget@gmail.com>

From: Elijah Newren <newren@gmail.com>

With the change in the last commit to move several functions to
write-or-die.h, csum-file.h no longer needs to include cache.h.
However, removing that include forces several other C files, which
directly or indirectly dependend upon csum-file.h's inclusion of
cache.h, to now be more explicit about their dependencies.

Signed-off-by: Elijah Newren <newren@gmail.com>
---
 bulk-checkin.c      | 2 +-
 chunk-format.c      | 1 +
 commit-graph.c      | 2 +-
 csum-file.h         | 1 -
 delta-islands.c     | 2 +-
 fetch-pack.c        | 2 +-
 midx.c              | 2 +-
 object-file.c       | 2 +-
 pack-bitmap-write.c | 3 ++-
 pack-bitmap.c       | 2 +-
 pack.h              | 2 ++
 packfile.c          | 2 +-
 12 files changed, 13 insertions(+), 10 deletions(-)

diff --git a/bulk-checkin.c b/bulk-checkin.c
index eb6d7a2805b..d2428b86111 100644
--- a/bulk-checkin.c
+++ b/bulk-checkin.c
@@ -1,7 +1,7 @@
 /*
  * Copyright (c) 2011, Google Inc.
  */
-#include "git-compat-util.h"
+#include "cache.h"
 #include "alloc.h"
 #include "bulk-checkin.h"
 #include "environment.h"
diff --git a/chunk-format.c b/chunk-format.c
index 6d1071729df..60a73c1b140 100644
--- a/chunk-format.c
+++ b/chunk-format.c
@@ -3,6 +3,7 @@
 #include "chunk-format.h"
 #include "csum-file.h"
 #include "gettext.h"
+#include "trace2.h"
 
 /*
  * When writing a chunk-based file format, collect the chunks in
diff --git a/commit-graph.c b/commit-graph.c
index 5481736c76c..f0cd2e7a2a3 100644
--- a/commit-graph.c
+++ b/commit-graph.c
@@ -1,4 +1,4 @@
-#include "git-compat-util.h"
+#include "cache.h"
 #include "config.h"
 #include "gettext.h"
 #include "hex.h"
diff --git a/csum-file.h b/csum-file.h
index 4cd9014e367..566e05cbd25 100644
--- a/csum-file.h
+++ b/csum-file.h
@@ -1,7 +1,6 @@
 #ifndef CSUM_FILE_H
 #define CSUM_FILE_H
 
-#include "cache.h"
 #include "hash.h"
 #include "write-or-die.h"
 
diff --git a/delta-islands.c b/delta-islands.c
index 1222b6a6cd1..73a01179e83 100644
--- a/delta-islands.c
+++ b/delta-islands.c
@@ -1,4 +1,4 @@
-#include "git-compat-util.h"
+#include "cache.h"
 #include "alloc.h"
 #include "attr.h"
 #include "object.h"
diff --git a/fetch-pack.c b/fetch-pack.c
index c453a4168f9..10f759532ce 100644
--- a/fetch-pack.c
+++ b/fetch-pack.c
@@ -1,4 +1,4 @@
-#include "git-compat-util.h"
+#include "cache.h"
 #include "alloc.h"
 #include "repository.h"
 #include "config.h"
diff --git a/midx.c b/midx.c
index b111665dcab..9af3e5de889 100644
--- a/midx.c
+++ b/midx.c
@@ -1,4 +1,4 @@
-#include "git-compat-util.h"
+#include "cache.h"
 #include "abspath.h"
 #include "alloc.h"
 #include "config.h"
diff --git a/object-file.c b/object-file.c
index 05fff230f73..397596e3c8f 100644
--- a/object-file.c
+++ b/object-file.c
@@ -6,7 +6,7 @@
  * This handles basic git object files - packing, unpacking,
  * creation etc.
  */
-#include "git-compat-util.h"
+#include "cache.h"
 #include "abspath.h"
 #include "alloc.h"
 #include "config.h"
diff --git a/pack-bitmap-write.c b/pack-bitmap-write.c
index 63f16080c9b..0fddeb1298b 100644
--- a/pack-bitmap-write.c
+++ b/pack-bitmap-write.c
@@ -1,4 +1,4 @@
-#include "git-compat-util.h"
+#include "cache.h"
 #include "alloc.h"
 #include "environment.h"
 #include "gettext.h"
@@ -17,6 +17,7 @@
 #include "pack-objects.h"
 #include "commit-reach.h"
 #include "prio-queue.h"
+#include "trace2.h"
 
 struct bitmapped_commit {
 	struct commit *commit;
diff --git a/pack-bitmap.c b/pack-bitmap.c
index 241ac9166c1..23d87e71bd9 100644
--- a/pack-bitmap.c
+++ b/pack-bitmap.c
@@ -1,4 +1,4 @@
-#include "git-compat-util.h"
+#include "cache.h"
 #include "alloc.h"
 #include "commit.h"
 #include "gettext.h"
diff --git a/pack.h b/pack.h
index 01d385903ad..3ab9e3f60c0 100644
--- a/pack.h
+++ b/pack.h
@@ -4,6 +4,8 @@
 #include "object.h"
 #include "csum-file.h"
 
+struct packed_git;
+struct pack_window;
 struct repository;
 
 /*
diff --git a/packfile.c b/packfile.c
index cc3b1e242c7..dd4b369e59f 100644
--- a/packfile.c
+++ b/packfile.c
@@ -1,4 +1,4 @@
-#include "git-compat-util.h"
+#include "cache.h"
 #include "alloc.h"
 #include "environment.h"
 #include "gettext.h"
-- 
gitgitgadget

  parent reply	other threads:[~2023-03-19  6:29 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 ` [PATCH 14/16] treewide: remove cache.h inclusion due to setup.h changes Elijah Newren via GitGitGadget
2023-03-19  6:28 ` [PATCH 15/16] write-or-die.h: move declarations for write-or-die.c functions from cache.h Elijah Newren via GitGitGadget
2023-03-19  6:28 ` Elijah Newren via GitGitGadget [this message]
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

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=38af06f55bc8fd87af580aa94b8a83cdc5b1fd4d.1679207286.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.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).