]> git.ipfire.org Git - thirdparty/git.git/commitdiff
treewide: remove unnecessary cache.h inclusion from several sources
authorElijah Newren <newren@gmail.com>
Tue, 21 Mar 2023 06:25:56 +0000 (06:25 +0000)
committerJunio C Hamano <gitster@pobox.com>
Tue, 21 Mar 2023 17:56:51 +0000 (10:56 -0700)
A number of files were apparently including cache.h solely to get
gettext.h.  By making those files explicitly include gettext.h, we can
already drop the include of cache.h in these files.  On top of that,
there were some files using cache.h that didn't need to for any reason.
Remove these unnecessary includes.

Signed-off-by: Elijah Newren <newren@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 files changed:
compat/linux/procinfo.c
compat/simple-ipc/ipc-shared.c
connected.c
grep.c
negotiator/default.c
negotiator/skipping.c
notes-cache.c
patch-ids.c
reflog.c
refs/iterator.c
replace-object.c
t/helper/test-hash.c
xdiff-interface.c

index bc2f9382a17f8f63a783680770a46358964e8f81..4bb2d66227bd5e0197855416957c1499de8c5565 100644 (file)
@@ -1,4 +1,4 @@
-#include "cache.h"
+#include "git-compat-util.h"
 
 #include "strbuf.h"
 #include "strvec.h"
index 1b9d359ab68185036c40a40bb2a44b8e5fbfb913..e5e1dda8ccdb60320a05b064479595eb4eb4997c 100644 (file)
@@ -1,4 +1,4 @@
-#include "cache.h"
+#include "git-compat-util.h"
 #include "simple-ipc.h"
 #include "strbuf.h"
 #include "pkt-line.h"
index a4c0aece75720988ae3622308c1436b9b18e7ee8..669bc4e8d6950b0f462ed7089ad8647c5c5763ce 100644 (file)
@@ -1,4 +1,4 @@
-#include "cache.h"
+#include "git-compat-util.h"
 #include "gettext.h"
 #include "hex.h"
 #include "object-store.h"
diff --git a/grep.c b/grep.c
index febb076a7e68b5463495bcaa7105a5194767d4f1..bb8796a829f6fe66e4fd8e0a4e0189288f4358c7 100644 (file)
--- a/grep.c
+++ b/grep.c
@@ -1,4 +1,4 @@
-#include "cache.h"
+#include "git-compat-util.h"
 #include "config.h"
 #include "gettext.h"
 #include "grep.h"
index b7e79feaf042290c041fbcec439fc2aa8e84a3df..5dd553a1fe32a7638883ce86b04c632500ff0f0e 100644 (file)
@@ -1,4 +1,4 @@
-#include "cache.h"
+#include "git-compat-util.h"
 #include "default.h"
 #include "../commit.h"
 #include "../fetch-negotiator.h"
index 264acf8bbeade378e1ba8358d8b39bcea5515693..4157c4d72f59708a146aca0d104948a1bc883562 100644 (file)
@@ -1,4 +1,4 @@
-#include "cache.h"
+#include "git-compat-util.h"
 #include "skipping.h"
 #include "../commit.h"
 #include "../fetch-negotiator.h"
index 9dfd251a8151d4205297b5c27064a01acf448f69..01a918c925e14b28568be3059e922eb584c2222f 100644 (file)
@@ -1,4 +1,4 @@
-#include "cache.h"
+#include "git-compat-util.h"
 #include "notes-cache.h"
 #include "object-store.h"
 #include "repository.h"
index a4473a88fa2f55b4f8e399fdcf4747f0e666a015..19af7bee9840e4fd945b21a10364bcd5c1fb546f 100644 (file)
@@ -1,4 +1,4 @@
-#include "cache.h"
+#include "git-compat-util.h"
 #include "diff.h"
 #include "commit.h"
 #include "hash-lookup.h"
index d1c393743182ede791f9f34074fd4ba99d79d5db..4e121e449d156b2a22609a72beb70d644e29c3a1 100644 (file)
--- a/reflog.c
+++ b/reflog.c
@@ -1,4 +1,4 @@
-#include "cache.h"
+#include "git-compat-util.h"
 #include "gettext.h"
 #include "object-store.h"
 #include "reflog.h"
index c9fd0bcaf90c753031a1624f593c607a4549bf5a..6b680f610efbee4e144cfa41763f45834b39d210 100644 (file)
@@ -3,7 +3,7 @@
  * documentation about the design and use of reference iterators.
  */
 
-#include "cache.h"
+#include "git-compat-util.h"
 #include "refs.h"
 #include "refs/refs-internal.h"
 #include "iterator.h"
index 9e30e0362ba06b34a8ab628e6b4d36d79446a09b..e98825d5852d80f6799904e4b0280f438375b75a 100644 (file)
@@ -1,4 +1,4 @@
-#include "cache.h"
+#include "git-compat-util.h"
 #include "gettext.h"
 #include "hex.h"
 #include "oidmap.h"
index 016248106a76bec6b2c85d535f2edeb4350ea8a8..45d829c908fec95ded535ebcfe502c3bb4aa5441 100644 (file)
@@ -1,5 +1,4 @@
 #include "test-tool.h"
-#include "cache.h"
 #include "hex.h"
 
 int cmd_hash_impl(int ac, const char **av, int algo)
index 5baf6ceb9473887765dc709ff5ff54da00a26559..356356afe719b3c28d8a95e39f44ccdf29371bc0 100644 (file)
@@ -1,4 +1,4 @@
-#include "cache.h"
+#include "git-compat-util.h"
 #include "config.h"
 #include "hex.h"
 #include "object-store.h"