git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH v2 16/22] treewide: remove cache.h inclusion due to previous changes

From
Elijah Newren via GitGitGadget <gitgitgadget@gmail.com>
Date
Apr 22, 2023, 20:17 UTC
Message-ID
<960b5438ce494a29cc93501cdf4ba4745740f374.1682194652.git.gitgitgadget@gmail.com>
In-Reply-To
<pull.1517.v2.git.1682194649.gitgitgadget@gmail.com>
From: Elijah Newren <newren@gmail.com>
Signed-off-by: Elijah Newren <newren@gmail.com>
---
 archive-zip.c                 | 2 +-
 bundle-uri.c                  | 2 +-
 color.c                       | 2 +-
 combine-diff.c                | 2 +-
 common-main.c                 | 2 +-
 config.c                      | 2 +-
 copy.c                        | 2 +-
 credential.c                  | 2 +-
 daemon.c                      | 2 +-
 date.c                        | 2 +-
 diagnose.c                    | 2 +-
 environment.c                 | 2 +-
 ll-merge.c                    | 2 +-
 match-trees.c                 | 2 +-
 midx.c                        | 2 +-
 object-file.c                 | 2 +-
 packfile.c                    | 2 +-
 pkt-line.c                    | 2 +-
 range-diff.c                  | 2 +-
 ref-filter.c                  | 2 +-
 t/helper/test-match-trees.c   | 1 -
 t/helper/test-mergesort.c     | 1 -
 t/helper/test-oid-array.c     | 1 -
 t/helper/test-oidtree.c       | 1 -
 t/helper/test-parse-options.c | 1 -
 t/helper/test-read-midx.c     | 1 -
 t/helper/test-string-list.c   | 1 -
 tree-diff.c                   | 2 +-
 tree-walk.c                   | 2 +-
 tree.c                        | 2 +-
 wrapper.c                     | 3 ++-
 31 files changed, 25 insertions(+), 31 deletions(-)
diff --git a/archive-zip.c b/archive-zip.c
index ef538a90df4..d0d065a312e 100644
--- a/archive-zip.c
+++ b/archive-zip.c
@@ -1,7 +1,7 @@
 /*
  * Copyright (c) 2006 Rene Scharfe
  */
-#include "cache.h"
+#include "git-compat-util.h"
 #include "config.h"
 #include "archive.h"
 #include "gettext.h"
diff --git a/bundle-uri.c b/bundle-uri.c
index 6d44662ee1f..ec1552bbca2 100644
--- a/bundle-uri.c
+++ b/bundle-uri.c
@@ -1,4 +1,4 @@
-#include "cache.h"
+#include "git-compat-util.h"
 #include "bundle-uri.h"
 #include "bundle.h"
 #include "copy.h"
diff --git a/color.c b/color.c
index f8a25ca807b..83abb11eda0 100644
--- a/color.c
+++ b/color.c
@@ -1,4 +1,4 @@
-#include "cache.h"
+#include "git-compat-util.h"
 #include "config.h"
 #include "color.h"
 #include "editor.h"
diff --git a/combine-diff.c b/combine-diff.c
index f7e9fb57473..f8d61965776 100644
--- a/combine-diff.c
+++ b/combine-diff.c
@@ -1,4 +1,4 @@
-#include "cache.h"
+#include "git-compat-util.h"
 #include "object-store.h"
 #include "commit.h"
 #include "convert.h"
diff --git a/common-main.c b/common-main.c
index 8ab50fa37a4..033778b3c56 100644
--- a/common-main.c
+++ b/common-main.c
@@ -1,4 +1,4 @@
-#include "cache.h"
+#include "git-compat-util.h"
 #include "exec-cmd.h"
 #include "gettext.h"
 #include "attr.h"
diff --git a/config.c b/config.c
index 97063a0743e..2a9ed27efe5 100644
--- a/config.c
+++ b/config.c
@@ -5,7 +5,7 @@
  * Copyright (C) Johannes Schindelin, 2005
  *
  */
-#include "cache.h"
+#include "git-compat-util.h"
 #include "abspath.h"
 #include "advice.h"
 #include "alloc.h"
diff --git a/copy.c b/copy.c
index 923d8a6dc61..882c79cffb0 100644
--- a/copy.c
+++ b/copy.c
@@ -1,4 +1,4 @@
-#include "cache.h"
+#include "git-compat-util.h"
 #include "copy.h"
 #include "path.h"
 #include "wrapper.h"
diff --git a/credential.c b/credential.c
index 42194efc9e0..a600d0c1ac1 100644
--- a/credential.c
+++ b/credential.c
@@ -1,4 +1,4 @@
-#include "cache.h"
+#include "git-compat-util.h"
 #include "abspath.h"
 #include "config.h"
 #include "credential.h"
diff --git a/daemon.c b/daemon.c
index f89f99d7ef4..7139cc201d7 100644
--- a/daemon.c
+++ b/daemon.c
@@ -1,4 +1,4 @@
-#include "cache.h"
+#include "git-compat-util.h"
 #include "abspath.h"
 #include "alloc.h"
 #include "config.h"
diff --git a/date.c b/date.c
index bc030da012f..a6ca6b318bd 100644
--- a/date.c
+++ b/date.c
@@ -4,7 +4,7 @@
  * Copyright (C) Linus Torvalds, 2005
  */
 
-#include "cache.h"
+#include "git-compat-util.h"
 #include "date.h"
 #include "gettext.h"
 #include "pager.h"
diff --git a/diagnose.c b/diagnose.c
index f9a2496c7ff..58f49f76c7a 100644
--- a/diagnose.c
+++ b/diagnose.c
@@ -1,4 +1,4 @@
-#include "cache.h"
+#include "git-compat-util.h"
 #include "diagnose.h"
 #include "compat/disk.h"
 #include "archive.h"
diff --git a/environment.c b/environment.c
index 541f0b19acf..28d18eaca8e 100644
--- a/environment.c
+++ b/environment.c
@@ -7,7 +7,7 @@
  * even if you might want to know where the git directory etc
  * are.
  */
-#include "cache.h"
+#include "git-compat-util.h"
 #include "abspath.h"
 #include "branch.h"
 #include "convert.h"
diff --git a/ll-merge.c b/ll-merge.c
index 85517e668e3..1993530688e 100644
--- a/ll-merge.c
+++ b/ll-merge.c
@@ -4,7 +4,7 @@
  * Copyright (c) 2007 Junio C Hamano
  */
 
-#include "cache.h"
+#include "git-compat-util.h"
 #include "config.h"
 #include "convert.h"
 #include "attr.h"
diff --git a/match-trees.c b/match-trees.c
index 9b78d99507b..6bc8eb76477 100644
--- a/match-trees.c
+++ b/match-trees.c
@@ -1,4 +1,4 @@
-#include "cache.h"
+#include "git-compat-util.h"
 #include "hex.h"
 #include "match-trees.h"
 #include "tree.h"
diff --git a/midx.c b/midx.c
index 2d0da573281..c7679c3c4f5 100644
--- a/midx.c
+++ b/midx.c
@@ -1,4 +1,4 @@
-#include "cache.h"
+#include "git-compat-util.h"
 #include "abspath.h"
 #include "alloc.h"
 #include "config.h"
diff --git a/object-file.c b/object-file.c
index 8163ddbaddd..8e0df7360ae 100644
--- a/object-file.c
+++ b/object-file.c
@@ -6,7 +6,7 @@
  * This handles basic git object files - packing, unpacking,
  * creation etc.
  */
-#include "cache.h"
+#include "git-compat-util.h"
 #include "abspath.h"
 #include "alloc.h"
 #include "config.h"
diff --git a/packfile.c b/packfile.c
index 9ae2278c22e..1ee9f65242c 100644
--- a/packfile.c
+++ b/packfile.c
@@ -1,4 +1,4 @@
-#include "cache.h"
+#include "git-compat-util.h"
 #include "alloc.h"
 #include "environment.h"
 #include "gettext.h"
diff --git a/pkt-line.c b/pkt-line.c
index 8b5fa788517..62b4208b66e 100644
--- a/pkt-line.c
+++ b/pkt-line.c
@@ -1,4 +1,4 @@
-#include "cache.h"
+#include "git-compat-util.h"
 #include "copy.h"
 #include "pkt-line.h"
 #include "gettext.h"
diff --git a/range-diff.c b/range-diff.c
index a1e0cffb9f6..6a704e6f471 100644
--- a/range-diff.c
+++ b/range-diff.c
@@ -1,4 +1,4 @@
-#include "cache.h"
+#include "git-compat-util.h"
 #include "environment.h"
 #include "gettext.h"
 #include "range-diff.h"
diff --git a/ref-filter.c b/ref-filter.c
index 5387f79be6d..594e66ad361 100644
--- a/ref-filter.c
+++ b/ref-filter.c
@@ -1,4 +1,4 @@
-#include "cache.h"
+#include "git-compat-util.h"
 #include "alloc.h"
 #include "environment.h"
 #include "gettext.h"
diff --git a/t/helper/test-match-trees.c b/t/helper/test-match-trees.c
index 3c62e33ccdf..a0afc1b4bc8 100644
--- a/t/helper/test-match-trees.c
+++ b/t/helper/test-match-trees.c
@@ -1,5 +1,4 @@
 #include "test-tool.h"
-#include "cache.h"
 #include "hex.h"
 #include "match-trees.h"
 #include "object-name.h"
diff --git a/t/helper/test-mergesort.c b/t/helper/test-mergesort.c
index 3aabae6c1c4..42ccc870516 100644
--- a/t/helper/test-mergesort.c
+++ b/t/helper/test-mergesort.c
@@ -1,5 +1,4 @@
 #include "test-tool.h"
-#include "cache.h"
 #include "mem-pool.h"
 #include "mergesort.h"
 #include "strbuf.h"
diff --git a/t/helper/test-oid-array.c b/t/helper/test-oid-array.c
index ea3bf278984..241e5da3157 100644
--- a/t/helper/test-oid-array.c
+++ b/t/helper/test-oid-array.c
@@ -1,5 +1,4 @@
 #include "test-tool.h"
-#include "cache.h"
 #include "hex.h"
 #include "oid-array.h"
 #include "setup.h"
diff --git a/t/helper/test-oidtree.c b/t/helper/test-oidtree.c
index 796c9811e0f..dc509fb8065 100644
--- a/t/helper/test-oidtree.c
+++ b/t/helper/test-oidtree.c
@@ -1,5 +1,4 @@
 #include "test-tool.h"
-#include "cache.h"
 #include "hex.h"
 #include "oidtree.h"
 #include "setup.h"
diff --git a/t/helper/test-parse-options.c b/t/helper/test-parse-options.c
index 20a81a1eb21..3003987ec17 100644
--- a/t/helper/test-parse-options.c
+++ b/t/helper/test-parse-options.c
@@ -1,5 +1,4 @@
 #include "test-tool.h"
-#include "cache.h"
 #include "parse-options.h"
 #include "strbuf.h"
 #include "string-list.h"
diff --git a/t/helper/test-read-midx.c b/t/helper/test-read-midx.c
index b32abff7f11..211addaa005 100644
--- a/t/helper/test-read-midx.c
+++ b/t/helper/test-read-midx.c
@@ -1,5 +1,4 @@
 #include "test-tool.h"
-#include "cache.h"
 #include "hex.h"
 #include "midx.h"
 #include "repository.h"
diff --git a/t/helper/test-string-list.c b/t/helper/test-string-list.c
index 959f27c74c6..042c6ff0059 100644
--- a/t/helper/test-string-list.c
+++ b/t/helper/test-string-list.c
@@ -1,5 +1,4 @@
 #include "test-tool.h"
-#include "cache.h"
 #include "strbuf.h"
 #include "string-list.h"
 
diff --git a/tree-diff.c b/tree-diff.c
index a76e6dae619..9ea2dd7a6c3 100644
--- a/tree-diff.c
+++ b/tree-diff.c
@@ -1,7 +1,7 @@
 /*
  * Helper functions for tree diff generation
  */
-#include "cache.h"
+#include "git-compat-util.h"
 #include "diff.h"
 #include "diffcore.h"
 #include "tree.h"
diff --git a/tree-walk.c b/tree-walk.c
index 2993c48c2f3..d3c48e06df0 100644
--- a/tree-walk.c
+++ b/tree-walk.c
@@ -1,4 +1,4 @@
-#include "cache.h"
+#include "git-compat-util.h"
 #include "tree-walk.h"
 #include "alloc.h"
 #include "dir.h"
diff --git a/tree.c b/tree.c
index f242a7ab691..0dd2029a8a2 100644
--- a/tree.c
+++ b/tree.c
@@ -1,4 +1,4 @@
-#include "cache.h"
+#include "git-compat-util.h"
 #include "cache-tree.h"
 #include "hex.h"
 #include "tree.h"
diff --git a/wrapper.c b/wrapper.c
index 5ab0460de5c..67f5f5dbe19 100644
--- a/wrapper.c
+++ b/wrapper.c
@@ -1,10 +1,11 @@
 /*
  * Various trivial helper wrappers around standard functions
  */
-#include "cache.h"
+#include "git-compat-util.h"
 #include "abspath.h"
 #include "config.h"
 #include "gettext.h"
+#include "object.h"
 #include "repository.h"
 #include "strbuf.h"
 #include "trace2.h"
-- 
gitgitgadget
Previous: Elijah NewrenNext: Ævar Arnfjörð Bjarmason
Message 55 of 81 in “Header cleanups (more splitting of cache.h and simplifying a few other deps)”
  1. 00/23 Header cleanups (more splitting of cache.h and simplifying a few other deps)Elijah Newren via GitGitGadget, Apr 16, 2023
  2. 06/23 copy.h: move declarations for copy.c functions from cache.hElijah Newren via GitGitGadget, Apr 16, 2023
  3. 03/23 protocol.h: move definition of DEFAULT_GIT_PORT from cache.hElijah Newren via GitGitGadget, Apr 16, 2023
  4. 02/23 symlinks.h: move declarations for symlinks.c functions from cache.hElijah Newren via GitGitGadget, Apr 16, 2023
  5. 01/23 treewide: be explicit about dependence on strbuf.hElijah Newren via GitGitGadget, Apr 16, 2023
  6. 04/23 packfile.h: move pack_window and pack_entry from cache.hElijah Newren via GitGitGadget, Apr 16, 2023
  7. 05/23 server-info.h: move declarations for server-info.c functions from cache.hElijah Newren via GitGitGadget, Apr 16, 2023
  8. 07/23 base85.h: move declarations for base85.c functions from cache.hElijah Newren via GitGitGadget, Apr 16, 2023
  9. 08/23 pkt-line.h: move declarations for pkt-line.c functions from cache.hElijah Newren via GitGitGadget, Apr 16, 2023
  10. 09/23 match-trees.h: move declarations for match-trees.c functions from cache.hElijah Newren via GitGitGadget, Apr 16, 2023
  11. 11/23 versioncmp.h: move declarations for versioncmp.c functions from cache.hElijah Newren via GitGitGadget, Apr 16, 2023
  12. 10/23 ws.h: move declarations for ws.c functions from cache.hElijah Newren via GitGitGadget, Apr 16, 2023
  13. 12/23 dir.h: move DTYPE defines from cache.hElijah Newren via GitGitGadget, Apr 16, 2023
  14. 15/23 cache,tree: move cmp_cache_name_compare from tree.[ch] to read-cache.cElijah Newren via GitGitGadget, Apr 16, 2023
  15. 16/23 cache,tree: move basic name compare functions from read-cache to treeElijah Newren via GitGitGadget, Apr 16, 2023
  16. 18/23 cache.h: remove unnecessary headersElijah Newren via GitGitGadget, Apr 16, 2023
  17. 13/23 tree-diff.c: move S_DIFFTREE_IFXMIN_NEQ define from cache.hElijah Newren via GitGitGadget, Apr 16, 2023
  18. 19/23 fsmonitor: reduce includes of cache.hElijah Newren via GitGitGadget, Apr 16, 2023
  19. 17/23 treewide: remove cache.h inclusion due to previous changesElijah Newren via GitGitGadget, Apr 16, 2023
  20. 14/23 hash.h, repository.h: reverse the order of these dependenciesElijah Newren via GitGitGadget, Apr 16, 2023
  21. Derrick StoleeApr 17, 2023
  22. Elijah NewrenApr 18, 2023
  23. Junio C HamanoApr 18, 2023
  24. Elijah NewrenApr 20, 2023
  25. Derrick StoleeApr 20, 2023
  26. Junio C HamanoApr 20, 2023
  27. Glen ChooApr 20, 2023
  28. 21/23 object-store.h: reduce unnecessary includesElijah Newren via GitGitGadget, Apr 16, 2023
  29. 20/23 commit.h: reduce unnecessary includesElijah Newren via GitGitGadget, Apr 16, 2023
  30. 22/23 diff.h: reduce unnecessary includesElijah Newren via GitGitGadget, Apr 16, 2023
  31. 23/23 reftable: ensure git-compat-util.h is the first (indirect) includeElijah Newren via GitGitGadget, Apr 16, 2023
  32. Derrick StoleeApr 17, 2023
  33. Elijah NewrenApr 18, 2023
  34. 00/22 Header cleanups (more splitting of cache.h and simplifying a few other deps)Elijah Newren via GitGitGadget, Apr 22, 2023
  35. 01/22 treewide: be explicit about dependence on strbuf.hElijah Newren via GitGitGadget, Apr 22, 2023
  36. 02/22 symlinks.h: move declarations for symlinks.c functions from cache.hElijah Newren via GitGitGadget, Apr 22, 2023
  37. 03/22 packfile.h: move pack_window and pack_entry from cache.hElijah Newren via GitGitGadget, Apr 22, 2023
  38. 07/22 pkt-line.h: move declarations for pkt-line.c functions from cache.hElijah Newren via GitGitGadget, Apr 22, 2023
  39. 04/22 server-info.h: move declarations for server-info.c functions from cache.hElijah Newren via GitGitGadget, Apr 22, 2023
  40. 05/22 copy.h: move declarations for copy.c functions from cache.hElijah Newren via GitGitGadget, Apr 22, 2023
  41. 08/22 match-trees.h: move declarations for match-trees.c functions from cache.hElijah Newren via GitGitGadget, Apr 22, 2023
  42. 06/22 base85.h: move declarations for base85.c functions from cache.hElijah Newren via GitGitGadget, Apr 22, 2023
  43. 09/22 ws.h: move declarations for ws.c functions from cache.hElijah Newren via GitGitGadget, Apr 22, 2023
  44. 10/22 versioncmp.h: move declarations for versioncmp.c functions from cache.hElijah Newren via GitGitGadget, Apr 22, 2023
  45. 11/22 dir.h: move DTYPE defines from cache.hElijah Newren via GitGitGadget, Apr 22, 2023
  46. 14/22 cache,tree: move cmp_cache_name_compare from tree.[ch] to read-cache.cElijah Newren via GitGitGadget, Apr 22, 2023
  47. 15/22 cache,tree: move basic name compare functions from read-cache to treeElijah Newren via GitGitGadget, Apr 22, 2023
  48. 12/22 tree-diff.c: move S_DIFFTREE_IFXMIN_NEQ define from cache.hElijah Newren via GitGitGadget, Apr 22, 2023
  49. Ævar Arnfjörð BjarmasonMay 1, 2023
  50. Junio C HamanoMay 1, 2023
  51. Elijah NewrenMay 2, 2023
  52. Elijah NewrenMay 2, 2023
  53. Junio C HamanoMay 2, 2023
  54. Elijah NewrenMay 2, 2023
  55. 16/22 treewide: remove cache.h inclusion due to previous changesElijah Newren via GitGitGadget, Apr 22, 2023
  56. Ævar Arnfjörð BjarmasonMay 1, 2023
  57. Elijah NewrenMay 2, 2023
  58. 17/22 cache.h: remove unnecessary headersElijah Newren via GitGitGadget, Apr 22, 2023
  59. Ævar Arnfjörð BjarmasonMay 1, 2023
  60. Elijah NewrenMay 2, 2023
  61. 18/22 fsmonitor: reduce includes of cache.hElijah Newren via GitGitGadget, Apr 22, 2023
  62. 20/22 object-store.h: reduce unnecessary includesElijah Newren via GitGitGadget, Apr 22, 2023
  63. Ævar Arnfjörð BjarmasonMay 1, 2023
  64. Elijah NewrenMay 2, 2023
  65. 13/22 hash-ll.h: split out of hash.h to remove dependency on repository.hElijah Newren via GitGitGadget, Apr 22, 2023
  66. Glen ChooApr 24, 2023
  67. Elijah NewrenApr 26, 2023
  68. Glen ChooApr 26, 2023
  69. Junio C HamanoApr 24, 2023
  70. Ævar Arnfjörð BjarmasonMay 1, 2023
  71. Elijah NewrenMay 2, 2023
  72. 19/22 commit.h: reduce unnecessary includesElijah Newren via GitGitGadget, Apr 22, 2023
  73. Ævar Arnfjörð BjarmasonMay 1, 2023
  74. Elijah NewrenMay 2, 2023
  75. 22/22 reftable: ensure git-compat-util.h is the first (indirect) includeElijah Newren via GitGitGadget, Apr 22, 2023
  76. 21/22 diff.h: reduce unnecessary includesElijah Newren via GitGitGadget, Apr 22, 2023
  77. Ævar Arnfjörð BjarmasonMay 1, 2023
  78. Derrick StoleeApr 24, 2023
  79. Junio C HamanoApr 24, 2023
  80. Glen ChooApr 26, 2023
  81. Junio C HamanoApr 26, 2023

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.