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: Emily Shaffer <nasamuffin@google.com>,
	Elijah Newren <newren@gmail.com>,
	Elijah Newren <newren@gmail.com>
Subject: [PATCH 14/16] treewide: replace cache.h with more direct headers, where possible
Date: Thu, 23 Feb 2023 08:05:19 +0000	[thread overview]
Message-ID: <3d99495aff38cf67dba6bb895c18c724fadc9251.1677139522.git.gitgitgadget@gmail.com> (raw)
In-Reply-To: <pull.1485.git.1677139521.gitgitgadget@gmail.com>

From: Elijah Newren <newren@gmail.com>

Signed-off-by: Elijah Newren <newren@gmail.com>
---
 advice.c          | 4 +++-
 decorate.c        | 3 ++-
 diffcore-order.c  | 3 ++-
 diffcore-rename.c | 6 +++++-
 diffcore-rotate.c | 3 ++-
 graph.c           | 3 ++-
 hook.c            | 5 ++++-
 quote.c           | 1 +
 sha1dc_git.c      | 4 +++-
 unix-socket.c     | 3 ++-
 url.c             | 4 +++-
 urlmatch.c        | 5 ++++-
 12 files changed, 33 insertions(+), 11 deletions(-)

diff --git a/advice.c b/advice.c
index fd189689437..a5ea460ab86 100644
--- a/advice.c
+++ b/advice.c
@@ -1,6 +1,8 @@
-#include "cache.h"
+#include "git-compat-util.h"
+#include "advice.h"
 #include "config.h"
 #include "color.h"
+#include "gettext.h"
 #include "help.h"
 #include "string-list.h"
 
diff --git a/decorate.c b/decorate.c
index 2036d159671..71e79daa825 100644
--- a/decorate.c
+++ b/decorate.c
@@ -2,7 +2,8 @@
  * decorate.c - decorate a git object with some arbitrary
  * data.
  */
-#include "cache.h"
+#include "git-compat-util.h"
+#include "hashmap.h"
 #include "object.h"
 #include "decorate.h"
 
diff --git a/diffcore-order.c b/diffcore-order.c
index 19e73311f9c..57ccab28464 100644
--- a/diffcore-order.c
+++ b/diffcore-order.c
@@ -1,7 +1,8 @@
 /*
  * Copyright (C) 2005 Junio C Hamano
  */
-#include "cache.h"
+#include "git-compat-util.h"
+#include "gettext.h"
 #include "diff.h"
 #include "diffcore.h"
 
diff --git a/diffcore-rename.c b/diffcore-rename.c
index 62c0299984e..7e9ff96d435 100644
--- a/diffcore-rename.c
+++ b/diffcore-rename.c
@@ -2,15 +2,19 @@
  *
  * Copyright (C) 2005 Junio C Hamano
  */
-#include "cache.h"
+#include "git-compat-util.h"
 #include "alloc.h"
 #include "diff.h"
 #include "diffcore.h"
 #include "object-store.h"
 #include "hashmap.h"
+#include "mem-pool.h"
+#include "oid-array.h"
 #include "progress.h"
 #include "promisor-remote.h"
+#include "string-list.h"
 #include "strmap.h"
+#include "trace2.h"
 
 /* Table of rename/copy destinations */
 
diff --git a/diffcore-rotate.c b/diffcore-rotate.c
index 445f060ab00..533986cf632 100644
--- a/diffcore-rotate.c
+++ b/diffcore-rotate.c
@@ -2,7 +2,8 @@
  * Copyright (C) 2021, Google LLC.
  * Based on diffcore-order.c, which is Copyright (C) 2005, Junio C Hamano
  */
-#include "cache.h"
+#include "git-compat-util.h"
+#include "gettext.h"
 #include "diff.h"
 #include "diffcore.h"
 
diff --git a/graph.c b/graph.c
index 568b6e7cd41..2a9dc430fae 100644
--- a/graph.c
+++ b/graph.c
@@ -1,4 +1,5 @@
-#include "cache.h"
+#include "git-compat-util.h"
+#include "gettext.h"
 #include "config.h"
 #include "commit.h"
 #include "color.h"
diff --git a/hook.c b/hook.c
index 1a848318634..f6ddd790988 100644
--- a/hook.c
+++ b/hook.c
@@ -1,7 +1,10 @@
-#include "cache.h"
+#include "git-compat-util.h"
+#include "advice.h"
+#include "gettext.h"
 #include "hook.h"
 #include "run-command.h"
 #include "config.h"
+#include "strbuf.h"
 
 const char *find_hook(const char *name)
 {
diff --git a/quote.c b/quote.c
index 2453397fbbd..7ccb5a06cd1 100644
--- a/quote.c
+++ b/quote.c
@@ -1,6 +1,7 @@
 #include "cache.h"
 #include "alloc.h"
 #include "quote.h"
+#include "strbuf.h"
 #include "strvec.h"
 
 int quote_path_fully = 1;
diff --git a/sha1dc_git.c b/sha1dc_git.c
index 5c300e812e0..9b675a046ee 100644
--- a/sha1dc_git.c
+++ b/sha1dc_git.c
@@ -1,4 +1,6 @@
-#include "cache.h"
+#include "git-compat-util.h"
+#include "sha1dc_git.h"
+#include "hex.h"
 
 #ifdef DC_SHA1_EXTERNAL
 /*
diff --git a/unix-socket.c b/unix-socket.c
index e0be1badb58..79800d80636 100644
--- a/unix-socket.c
+++ b/unix-socket.c
@@ -1,4 +1,5 @@
-#include "cache.h"
+#include "git-compat-util.h"
+#include "strbuf.h"
 #include "unix-socket.h"
 
 #define DEFAULT_UNIX_STREAM_LISTEN_BACKLOG (5)
diff --git a/url.c b/url.c
index e04bd60b6be..2e1a9f6feec 100644
--- a/url.c
+++ b/url.c
@@ -1,4 +1,6 @@
-#include "cache.h"
+#include "git-compat-util.h"
+#include "hex.h"
+#include "strbuf.h"
 #include "url.h"
 
 int is_urlschemechar(int first_flag, int ch)
diff --git a/urlmatch.c b/urlmatch.c
index 620a648efc5..eba0bdd77fe 100644
--- a/urlmatch.c
+++ b/urlmatch.c
@@ -1,4 +1,7 @@
-#include "cache.h"
+#include "git-compat-util.h"
+#include "gettext.h"
+#include "hex.h"
+#include "strbuf.h"
 #include "urlmatch.h"
 
 #define URL_ALPHA "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"
-- 
gitgitgadget


  parent reply	other threads:[~2023-02-23  8:07 UTC|newest]

Thread overview: 60+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-23  8:05 [PATCH 00/16] Header cleanups Elijah Newren via GitGitGadget
2023-02-23  8:05 ` [PATCH 01/16] treewide: ensure one of the appropriate headers is sourced first Elijah Newren via GitGitGadget
2023-02-23  8:05 ` [PATCH 02/16] treewide: remove unnecessary git-compat-util.h includes in headers Elijah Newren via GitGitGadget
2023-02-23 13:52   ` Derrick Stolee
2023-02-23 18:13     ` Elijah Newren
2023-02-23 19:35   ` Junio C Hamano
2023-02-23 19:53     ` Elijah Newren
2023-02-23 22:07       ` Junio C Hamano
2023-02-23 23:41         ` Elijah Newren
2023-02-23  8:05 ` [PATCH 03/16] treewide: remove unnecessary cache.h includes Elijah Newren via GitGitGadget
2023-02-23  8:05 ` [PATCH 04/16] treewide: remove unnecessary cache.h includes in source files Elijah Newren via GitGitGadget
2023-02-23 13:57   ` Derrick Stolee
2023-02-23  8:05 ` [PATCH 05/16] alloc.h: move ALLOC_GROW() functions from cache.h Elijah Newren via GitGitGadget
2023-02-23 14:06   ` Derrick Stolee
2023-02-23 18:22     ` Elijah Newren
2023-02-23 19:40     ` Junio C Hamano
2023-02-23 19:39   ` Junio C Hamano
2023-02-23  8:05 ` [PATCH 06/16] hash.h: move some oid-related declarations " Elijah Newren via GitGitGadget
2023-02-23 14:08   ` Derrick Stolee
2023-02-23 18:25     ` Elijah Newren
2023-02-24 23:55   ` Jonathan Tan
2023-02-23  8:05 ` [PATCH 07/16] hex.h: move some hex-related " Elijah Newren via GitGitGadget
2023-02-23 14:11   ` Derrick Stolee
2023-02-23 19:31     ` Elijah Newren
2023-02-23  8:05 ` [PATCH 08/16] pretty.h: move has_non_ascii() declaration from commit.h Elijah Newren via GitGitGadget
2023-02-23  8:05 ` [PATCH 09/16] ident.h: move ident-related declarations out of cache.h Elijah Newren via GitGitGadget
2023-02-23  8:05 ` [PATCH 10/16] object.h: stop depending on cache.h; make cache.h depend on object.h Elijah Newren via GitGitGadget
2023-02-23 14:17   ` Derrick Stolee
2023-02-23 19:55     ` Elijah Newren
2023-02-23  8:05 ` [PATCH 11/16] dir.h: refactor to no longer need to include cache.h Elijah Newren via GitGitGadget
2023-02-23  8:05 ` [PATCH 12/16] object-store.h: move struct object_info from cache.h Elijah Newren via GitGitGadget
2023-02-23 14:20   ` Derrick Stolee
2023-02-23 19:55     ` Elijah Newren
2023-02-23  8:05 ` [PATCH 13/16] replace-object.h: move read_replace_refs declaration from cache.h to here Elijah Newren via GitGitGadget
2023-02-23  8:05 ` Elijah Newren via GitGitGadget [this message]
2023-02-23  8:05 ` [PATCH 15/16] Remove unnecessary includes of builtin.h Elijah Newren via GitGitGadget
2023-02-23  8:05 ` [PATCH 16/16] diff.h: remove unnecessary include of object.h Elijah Newren via GitGitGadget
2023-02-23 14:27 ` [PATCH 00/16] Header cleanups Derrick Stolee
2023-02-24  0:09 ` [PATCH v2 00/17] " Elijah Newren via GitGitGadget
2023-02-24  0:09   ` [PATCH v2 01/17] treewide: ensure one of the appropriate headers is sourced first Elijah Newren via GitGitGadget
2023-02-24  0:09   ` [PATCH v2 02/17] treewide: remove unnecessary git-compat-util.h includes in headers Elijah Newren via GitGitGadget
2023-02-24  0:09   ` [PATCH v2 03/17] treewide: remove unnecessary cache.h includes Elijah Newren via GitGitGadget
2023-02-24  0:09   ` [PATCH v2 04/17] treewide: remove unnecessary cache.h includes in source files Elijah Newren via GitGitGadget
2023-02-24  0:09   ` [PATCH v2 05/17] alloc.h: move ALLOC_GROW() functions from cache.h Elijah Newren via GitGitGadget
2023-02-24  0:09   ` [PATCH v2 06/17] hash.h: move some oid-related declarations " Elijah Newren via GitGitGadget
2023-02-24  0:09   ` [PATCH v2 07/17] hex.h: move some hex-related " Elijah Newren via GitGitGadget
2023-02-24  0:09   ` [PATCH v2 08/17] cache.h: remove dependence on hex.h; make other files include it explicitly Elijah Newren via GitGitGadget
2023-02-24  0:09   ` [PATCH v2 09/17] pretty.h: move has_non_ascii() declaration from commit.h Elijah Newren via GitGitGadget
2023-02-24  0:09   ` [PATCH v2 10/17] ident.h: move ident-related declarations out of cache.h Elijah Newren via GitGitGadget
2023-02-24  0:09   ` [PATCH v2 11/17] object.h: stop depending on cache.h; make cache.h depend on object.h Elijah Newren via GitGitGadget
2023-02-24  0:09   ` [PATCH v2 12/17] dir.h: refactor to no longer need to include cache.h Elijah Newren via GitGitGadget
2023-02-24  0:09   ` [PATCH v2 13/17] object-store.h: move struct object_info from cache.h Elijah Newren via GitGitGadget
2023-02-24  0:09   ` [PATCH v2 14/17] replace-object.h: move read_replace_refs declaration from cache.h to here Elijah Newren via GitGitGadget
2023-02-24  0:09   ` [PATCH v2 15/17] treewide: replace cache.h with more direct headers, where possible Elijah Newren via GitGitGadget
2023-02-24  0:09   ` [PATCH v2 16/17] Remove unnecessary includes of builtin.h Elijah Newren via GitGitGadget
2023-02-24  0:09   ` [PATCH v2 17/17] diff.h: remove unnecessary include of object.h Elijah Newren via GitGitGadget
2023-02-24 14:03   ` [PATCH v2 00/17] Header cleanups Johannes Schindelin
2023-02-25  0:10   ` Jonathan Tan
2023-02-25  0:57     ` Elijah Newren
2023-02-27 13:51   ` Derrick Stolee

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=3d99495aff38cf67dba6bb895c18c724fadc9251.1677139522.git.gitgitgadget@gmail.com \
    --to=gitgitgadget@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=nasamuffin@google.com \
    --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).