]> git.ipfire.org Git - thirdparty/git.git/commitdiff
treewide: remove unnecessary cache.h inclusion from a few headers
authorElijah Newren <newren@gmail.com>
Tue, 21 Mar 2023 06:25:53 +0000 (06:25 +0000)
committerJunio C Hamano <gitster@pobox.com>
Tue, 21 Mar 2023 17:56:50 +0000 (10:56 -0700)
Ever since a64215b6cd ("object.h: stop depending on cache.h; make
cache.h depend on object.h", 2023-02-24), we have a few headers that
could have replaced their include of cache.h with an include of
object.h.  Make that change now.

Some C files had to start including cache.h after this change (or some
smaller header it had brought in), because the C files were depending
on things from cache.h but were only formerly implicitly getting
cache.h through one of these headers being modified in this patch.

Signed-off-by: Elijah Newren <newren@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
28 files changed:
bulk-checkin.h
bundle.h
cache-tree.c
config.c
fmt-merge-msg.c
fsck.c
http-backend.c
pack-mtimes.c
packfile.h
prune-packed.c
ref-filter.c
refs.c
refs.h
refs/packed-backend.c
refspec.c
remote.c
server-info.c
shallow.c
strbuf.c
streaming.h
submodule.c
t/helper/test-bundle-uri.c
t/helper/test-fast-rebase.c
t/helper/test-pack-mtimes.c
t/helper/test-reach.c
transport.c
transport.h
worktree.c

index 8281b9cb159691530eb2f74b46daf535261f6c93..48fe9a6e9171e77aba4f2a3c7ab1edd79e9291b8 100644 (file)
@@ -4,7 +4,7 @@
 #ifndef BULK_CHECKIN_H
 #define BULK_CHECKIN_H
 
-#include "cache.h"
+#include "object.h"
 
 void prepare_loose_object_bulk_checkin(void);
 void fsync_loose_object_bulk_checkin(int fd, const char *filename);
index 9f2bd733a6aa33a7f192a5fd70bd34c61ad9517a..021adbdcbb3d9b482a08b304a80e62264e1a3630 100644 (file)
--- a/bundle.h
+++ b/bundle.h
@@ -2,7 +2,6 @@
 #define BUNDLE_H
 
 #include "strvec.h"
-#include "cache.h"
 #include "string-list.h"
 #include "list-objects-filter-options.h"
 
index 9d46ecef09162a2d01d6f4ee508b2b1cdb1c2304..6f899beb041032361e721461ad9ac4d2968c94e7 100644 (file)
@@ -1,4 +1,4 @@
-#include "git-compat-util.h"
+#include "cache.h"
 #include "alloc.h"
 #include "hex.h"
 #include "lockfile.h"
index d0aff55fa66b7f57f29a958092ce898034547ec3..983c45fc37b4e8cd8a0f9af2c8a9ce704b521eb3 100644 (file)
--- a/config.c
+++ b/config.c
@@ -5,7 +5,7 @@
  * Copyright (C) Johannes Schindelin, 2005
  *
  */
-#include "git-compat-util.h"
+#include "cache.h"
 #include "alloc.h"
 #include "date.h"
 #include "branch.h"
index 24cc44bdbc9070d699447e10fc3e03bd8b71965f..c870cb95b9d77b0cc9541c44344cf6e1ab25ca1d 100644 (file)
@@ -1,4 +1,4 @@
-#include "git-compat-util.h"
+#include "cache.h"
 #include "alloc.h"
 #include "config.h"
 #include "refs.h"
diff --git a/fsck.c b/fsck.c
index 871c0a9a2522cdf1abd16ceef4d224d12fcb7d2e..70e12497878c361ce6ccbc2811ddfbbd701ee9d1 100644 (file)
--- a/fsck.c
+++ b/fsck.c
@@ -1,4 +1,4 @@
-#include "git-compat-util.h"
+#include "cache.h"
 #include "alloc.h"
 #include "hex.h"
 #include "object-store.h"
index 9cfc6f25414b5cc40b7b1e4389339f47aead50b0..7e7c19e66b379a992474e31f14c0bec7b45cbab0 100644 (file)
@@ -1,4 +1,4 @@
-#include "git-compat-util.h"
+#include "cache.h"
 #include "alloc.h"
 #include "config.h"
 #include "hex.h"
index 0f9785fc5e4ed9c26f7c1f5503395e74da0d74b3..cd92fc1d86c1206ed1c1a801e985446ed41f9d98 100644 (file)
@@ -1,4 +1,4 @@
-#include "git-compat-util.h"
+#include "cache.h"
 #include "pack-mtimes.h"
 #include "object-store.h"
 #include "packfile.h"
index a3f6723857bf120f611e4f506e85428132f7ccc3..648be62bf228c870f4f2361e5df1dff51afd826c 100644 (file)
@@ -1,11 +1,13 @@
 #ifndef PACKFILE_H
 #define PACKFILE_H
 
-#include "cache.h"
+#include "object.h"
 #include "oidset.h"
 
 /* in object-store.h */
 struct packed_git;
+struct pack_entry;
+struct pack_window;
 struct object_info;
 
 /*
index d2813f6a40547035daaff40fcd0bc296c0832cca..e02f466c2ee81e09e981d001b525e37b32c3368e 100644 (file)
@@ -1,4 +1,4 @@
-#include "git-compat-util.h"
+#include "cache.h"
 #include "object-store.h"
 #include "packfile.h"
 #include "progress.h"
index ed802778da7208377d9054f2de1805f91be39509..38141bce8db6638770e6a56160985c1c2e5d58a1 100644 (file)
@@ -1,4 +1,4 @@
-#include "git-compat-util.h"
+#include "cache.h"
 #include "alloc.h"
 #include "hex.h"
 #include "parse-options.h"
diff --git a/refs.c b/refs.c
index 53240bcc07bc1ec37f98afaf1a4d42a8a481138d..4e5cc73fb10c069737baa1bf22ec9443f6a8d32d 100644 (file)
--- a/refs.c
+++ b/refs.c
@@ -2,7 +2,7 @@
  * The backend-independent part of the reference module.
  */
 
-#include "git-compat-util.h"
+#include "cache.h"
 #include "alloc.h"
 #include "config.h"
 #include "hashmap.h"
diff --git a/refs.h b/refs.h
index 935cdd1ece3db3af483cb2225f204966c0e6cfa5..5741b69d0d151ce60adcb1ccd9db0889255bf9ef 100644 (file)
--- a/refs.h
+++ b/refs.h
@@ -1,7 +1,6 @@
 #ifndef REFS_H
 #define REFS_H
 
-#include "cache.h"
 #include "commit.h"
 
 struct object_id;
index b665d0f7d9b2792a05d79d8613b17b684dd7f318..6f975185995118099c2f97cde146e5d8f4ffc67d 100644 (file)
@@ -1,4 +1,4 @@
-#include "../git-compat-util.h"
+#include "../cache.h"
 #include "../alloc.h"
 #include "../config.h"
 #include "../hex.h"
index 28d90911aa5ed383afac90f6a444891cad7877ac..7b5c305514d2c251fdcc750186855e5093e42635 100644 (file)
--- a/refspec.c
+++ b/refspec.c
@@ -1,5 +1,6 @@
 #include "git-compat-util.h"
 #include "alloc.h"
+#include "gettext.h"
 #include "hex.h"
 #include "strvec.h"
 #include "refs.h"
index b04e5da33831a75b59dfd81383b03825370d29ac..2daddb85cb7265e57292401aaf57cd76ad50a4a8 100644 (file)
--- a/remote.c
+++ b/remote.c
@@ -1,4 +1,4 @@
-#include "git-compat-util.h"
+#include "cache.h"
 #include "alloc.h"
 #include "config.h"
 #include "hex.h"
index 40436892023f29f1008d6954fd8b7e5d272610a1..78643377057921a97d2178d4fd0b7bcb195fe57d 100644 (file)
@@ -1,4 +1,4 @@
-#include "git-compat-util.h"
+#include "cache.h"
 #include "alloc.h"
 #include "dir.h"
 #include "hex.h"
index 1cbb05ba0e45637f1b0655b9b1dbd51ac4da8117..c5433a4fd30ee3e99e74ed5783113037b874a7fa 100644 (file)
--- a/shallow.c
+++ b/shallow.c
@@ -1,4 +1,4 @@
-#include "git-compat-util.h"
+#include "cache.h"
 #include "alloc.h"
 #include "hex.h"
 #include "repository.h"
index 1c57ac6574fecf3dfe19dc38e426cb99d54e58f1..8800830ebf811e5bd08f1deef1747fcc974a6cbc 100644 (file)
--- a/strbuf.c
+++ b/strbuf.c
@@ -1,4 +1,4 @@
-#include "git-compat-util.h"
+#include "cache.h"
 #include "alloc.h"
 #include "hex.h"
 #include "refs.h"
index 5e4e6acfd0dc947bcb92680fbae71de1fc486a78..bd27f59e5764aec64cd1cf927baf213fcec4d893 100644 (file)
@@ -3,10 +3,12 @@
  */
 #ifndef STREAMING_H
 #define STREAMING_H 1
-#include "cache.h"
+
+#include "object.h"
 
 /* opaque */
 struct git_istream;
+struct stream_filter;
 
 struct git_istream *open_istream(struct repository *, const struct object_id *,
                                 enum object_type *, unsigned long *,
index 2a057c35b749a564e793a0f80c553744f5189746..0baf97cf770a4ade5f51041ed48d29e4d0312581 100644 (file)
@@ -1,4 +1,4 @@
-#include "git-compat-util.h"
+#include "cache.h"
 #include "alloc.h"
 #include "repository.h"
 #include "config.h"
index b18e7603103817b931acf6ab2a8cbbae8538bb8e..475058592d157da39a40ff32231a91f62a5d186a 100644 (file)
@@ -1,6 +1,7 @@
 #include "test-tool.h"
 #include "parse-options.h"
 #include "bundle-uri.h"
+#include "gettext.h"
 #include "strbuf.h"
 #include "string-list.h"
 #include "transport.h"
index b1edb92a03252817c5a0a388e75f83c8ce67a2d0..1e975df9041449e029405c7df8ef6a48d63f4c5c 100644 (file)
@@ -12,7 +12,7 @@
 
 #define USE_THE_INDEX_VARIABLE
 #include "test-tool.h"
-
+#include "cache.h"
 #include "cache-tree.h"
 #include "commit.h"
 #include "hex.h"
index f68b3761b68ca7bc2d6465f6a89a9f5a879215b7..0e53dee9e57a1e29c38958334941eefb1cead288 100644 (file)
@@ -1,5 +1,5 @@
-#include "git-compat-util.h"
 #include "test-tool.h"
+#include "cache.h"
 #include "hex.h"
 #include "strbuf.h"
 #include "object-store.h"
index de8f26639d411710e1c745173091622df2cf0837..05d56267a9fed842324d3d73e890a0a020562e65 100644 (file)
@@ -1,4 +1,5 @@
 #include "test-tool.h"
+#include "cache.h"
 #include "alloc.h"
 #include "commit.h"
 #include "commit-reach.h"
index 906dbad5a08160ecc643bfdcf379e343225e22ee..80059124c0a5a2f38bf67fc421d4f933e8110c3f 100644 (file)
@@ -1,4 +1,4 @@
-#include "git-compat-util.h"
+#include "cache.h"
 #include "alloc.h"
 #include "config.h"
 #include "hex.h"
index 85150f504fbfb9501109d297223f566cc36fe0e5..6393cd9823c01f878000ded305cf621b2b526824 100644 (file)
@@ -1,7 +1,6 @@
 #ifndef TRANSPORT_H
 #define TRANSPORT_H
 
-#include "cache.h"
 #include "run-command.h"
 #include "remote.h"
 #include "list-objects-filter-options.h"
index e10594ef3369ba420f61f1e51faa2a177233c77a..cbb0db2d7cc7a093bb7aab19338515849ab07524 100644 (file)
@@ -1,4 +1,4 @@
-#include "git-compat-util.h"
+#include "cache.h"
 #include "alloc.h"
 #include "repository.h"
 #include "refs.h"