]> Kevux Git Server - rit/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 8281b9c..48fe9a6 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 9f2bd73..021adbd 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 9d46ece..6f899be 100644 (file)
@@ -1,4 +1,4 @@
-#include "git-compat-util.h"
+#include "cache.h"
 #include "alloc.h"
 #include "hex.h"
 #include "lockfile.h"
index d0aff55..983c45f 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 24cc44b..c870cb9 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 871c0a9..70e1249 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 9cfc6f2..7e7c19e 100644 (file)
@@ -1,4 +1,4 @@
-#include "git-compat-util.h"
+#include "cache.h"
 #include "alloc.h"
 #include "config.h"
 #include "hex.h"
index 0f9785f..cd92fc1 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 a3f6723..648be62 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 d2813f6..e02f466 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 ed80277..38141bc 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 53240bc..4e5cc73 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 935cdd1..5741b69 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 b665d0f..6f97518 100644 (file)
@@ -1,4 +1,4 @@
-#include "../git-compat-util.h"
+#include "../cache.h"
 #include "../alloc.h"
 #include "../config.h"
 #include "../hex.h"
index 28d9091..7b5c305 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 b04e5da..2daddb8 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 4043689..7864337 100644 (file)
@@ -1,4 +1,4 @@
-#include "git-compat-util.h"
+#include "cache.h"
 #include "alloc.h"
 #include "dir.h"
 #include "hex.h"
index 1cbb05b..c5433a4 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 1c57ac6..8800830 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 5e4e6ac..bd27f59 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 2a057c3..0baf97c 100644 (file)
@@ -1,4 +1,4 @@
-#include "git-compat-util.h"
+#include "cache.h"
 #include "alloc.h"
 #include "repository.h"
 #include "config.h"
index b18e760..4750585 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 b1edb92..1e975df 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 f68b376..0e53dee 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 de8f266..05d5626 100644 (file)
@@ -1,4 +1,5 @@
 #include "test-tool.h"
+#include "cache.h"
 #include "alloc.h"
 #include "commit.h"
 #include "commit-reach.h"
index 906dbad..8005912 100644 (file)
@@ -1,4 +1,4 @@
-#include "git-compat-util.h"
+#include "cache.h"
 #include "alloc.h"
 #include "config.h"
 #include "hex.h"
index 85150f5..6393cd9 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 e10594e..cbb0db2 100644 (file)
@@ -1,4 +1,4 @@
-#include "git-compat-util.h"
+#include "cache.h"
 #include "alloc.h"
 #include "repository.h"
 #include "refs.h"