]> git.ipfire.org Git - thirdparty/git.git/commitdiff
commit.h: reduce unnecessary includes
authorElijah Newren <newren@gmail.com>
Sat, 22 Apr 2023 20:17:26 +0000 (20:17 +0000)
committerJunio C Hamano <gitster@pobox.com>
Mon, 24 Apr 2023 19:47:33 +0000 (12:47 -0700)
Signed-off-by: Elijah Newren <newren@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
35 files changed:
add-interactive.c
archive.c
bloom.c
builtin/diff-tree.c
builtin/diff.c
builtin/gc.c
builtin/log.c
builtin/merge-tree.c
combine-diff.c
commit-graph.c
commit.c
commit.h
dir.c
fetch-pack.c
fsck.c
gpg-interface.c
grep.c
http-push.c
log-tree.c
merge-ort-wrappers.c
merge.c
notes-cache.c
notes-utils.c
object-name.c
pack-bitmap-write.c
parse-options-cb.c
parse-options.c
read-cache.c
ref-filter.c
reflog.c
refs/debug.c
refspec.c
revision.h
send-pack.c
wt-status.c

index 757a9929d41242fd878dae25d12839cd2a6cb52d..de877ca0525482c9a5a2a6ad9d86e02e5fc79e53 100644 (file)
@@ -12,6 +12,7 @@
 #include "dir.h"
 #include "run-command.h"
 #include "prompt.h"
+#include "tree.h"
 
 static void init_color(struct repository *r, struct add_i_state *s,
                       const char *section_and_slot, char *dst,
index ab8966d73a517ece5e5cb0eab55d23dbe7b8ef30..6226e16b25e10afaa4fa4553a676d053abfb2dc8 100644 (file)
--- a/archive.c
+++ b/archive.c
@@ -6,10 +6,12 @@
 #include "environment.h"
 #include "gettext.h"
 #include "hex.h"
+#include "pretty.h"
 #include "setup.h"
 #include "refs.h"
 #include "object-store.h"
 #include "commit.h"
+#include "tree.h"
 #include "tree-walk.h"
 #include "attr.h"
 #include "archive.h"
diff --git a/bloom.c b/bloom.c
index d0730525da51f783e0f72f502a62db4407bd7ad9..aef6b5fea2d18f521b4812bd017fe685f635be47 100644 (file)
--- a/bloom.c
+++ b/bloom.c
@@ -6,6 +6,7 @@
 #include "hashmap.h"
 #include "commit-graph.h"
 #include "commit.h"
+#include "commit-slab.h"
 
 define_commit_slab(bloom_filter_slab, struct bloom_filter);
 
index 385c2d0230c5864f74ee26efd58a56993490222a..0b02c62b85e5b64b4371b3604f467a9aa2d5f512 100644 (file)
@@ -9,6 +9,7 @@
 #include "builtin.h"
 #include "submodule.h"
 #include "repository.h"
+#include "tree.h"
 
 static struct rev_info log_tree_opt;
 
index 8f386535d613bcb2be079af0ab35136eb7f166b7..457dee1445739d098611e4ddec8c96a22f7e6277 100644 (file)
@@ -22,6 +22,7 @@
 #include "setup.h"
 #include "submodule.h"
 #include "oid-array.h"
+#include "tree.h"
 
 #define DIFF_NO_INDEX_EXPLICIT 1
 #define DIFF_NO_INDEX_IMPLICIT 2
index b95154fba161705fde14a5b183538343536cdd74..d11712b14447421db5c2b8664c4217d738882ea1 100644 (file)
@@ -12,6 +12,7 @@
 
 #include "builtin.h"
 #include "abspath.h"
+#include "date.h"
 #include "environment.h"
 #include "hex.h"
 #include "repository.h"
index 95de51921f8c8e1a5df89049c47089878b8abb1a..137b84b31ef0daa2b701ad91668f4452d84525dd 100644 (file)
@@ -44,6 +44,7 @@
 #include "commit-reach.h"
 #include "range-diff.h"
 #include "tmp-objdir.h"
+#include "tree.h"
 #include "write-or-die.h"
 
 #define MAIL_DEFAULT_WRAP 72
index 6b9f006ec190d734ce8ee5a2aee1652aebf15ae8..aa8040c2a6a6ffa1ae03118910da61f4729fd11a 100644 (file)
@@ -16,6 +16,7 @@
 #include "exec-cmd.h"
 #include "merge-blobs.h"
 #include "quote.h"
+#include "tree.h"
 
 static int line_termination = '\n';
 
index f8d619657767134ee56aaf57eab841e76ede00d0..1e3cd7fb170413eb47677269a77526b41e0ba5c7 100644 (file)
@@ -13,6 +13,7 @@
 #include "xdiff/xmacros.h"
 #include "log-tree.h"
 #include "refs.h"
+#include "tree.h"
 #include "userdiff.h"
 #include "oid-array.h"
 #include "revision.h"
index 0c4f2266445c94f1cc3598e0ebf29d1068cade9a..6f612f368ba0c664ac55fdcfd8b662320ea1f04e 100644 (file)
@@ -23,6 +23,7 @@
 #include "shallow.h"
 #include "json-writer.h"
 #include "trace2.h"
+#include "tree.h"
 #include "chunk-format.h"
 #include "wrapper.h"
 
index 878b4473e4ce14dc664839f97dc3d7ed85d0b437..10676165a1dac562980b45383db75f21bff80947 100644 (file)
--- a/commit.c
+++ b/commit.c
@@ -26,6 +26,7 @@
 #include "run-command.h"
 #include "setup.h"
 #include "shallow.h"
+#include "tree.h"
 #include "hook.h"
 
 static struct commit_extra_header *read_commit_extra_header_lines(const char *buf, size_t len, const char **);
index 69b2f376e9d91de7ecc554fcb1610332ac205d3a..28928833c544081f9c08971f7a4450e97154ebb3 100644 (file)
--- a/commit.h
+++ b/commit.h
@@ -2,13 +2,10 @@
 #define COMMIT_H
 
 #include "object.h"
-#include "tree.h"
-#include "strbuf.h"
-#include "decorate.h"
-#include "gpg-interface.h"
-#include "string-list.h"
-#include "pretty.h"
-#include "commit-slab.h"
+
+struct signature_check;
+struct strbuf;
+struct tree;
 
 #define COMMIT_NOT_FROM_GRAPH 0xFFFFFFFF
 #define GENERATION_NUMBER_INFINITY ((1ULL << 63) - 1)
diff --git a/dir.c b/dir.c
index ed262fa6e43ada6bb6e0224e6ff099fcf1ac273f..a7469df3ac7f95109c48ced53259aac021e14b8b 100644 (file)
--- a/dir.c
+++ b/dir.c
@@ -27,6 +27,7 @@
 #include "submodule-config.h"
 #include "symlinks.h"
 #include "trace2.h"
+#include "tree.h"
 #include "wrapper.h"
 
 /*
index 677102465a12c3c2fa4ab7f5a40b4b28c3cc5afd..a9745bd9faf7f6fc747edd8c65bb6481c587f145 100644 (file)
@@ -2,6 +2,7 @@
 #include "alloc.h"
 #include "repository.h"
 #include "config.h"
+#include "date.h"
 #include "environment.h"
 #include "gettext.h"
 #include "hex.h"
diff --git a/fsck.c b/fsck.c
index adbe8bf59e7a2a1a41448f1deb8088e7f9ddd8dc..3261ef9ec28928974c6b555c05752511e63e484a 100644 (file)
--- a/fsck.c
+++ b/fsck.c
@@ -1,5 +1,6 @@
 #include "git-compat-util.h"
 #include "alloc.h"
+#include "date.h"
 #include "hex.h"
 #include "object-store.h"
 #include "repository.h"
index 8615dcd4b4bb3b6b78f2d6c29f93f539a335f1d7..49d72c2066b2943af732cca4dd0abeea6f7b367a 100644 (file)
@@ -1,6 +1,7 @@
 #include "git-compat-util.h"
 #include "commit.h"
 #include "config.h"
+#include "date.h"
 #include "gettext.h"
 #include "run-command.h"
 #include "strbuf.h"
diff --git a/grep.c b/grep.c
index d144b374894817c45cd0773bb1d42b884b3e9d9d..e620e375b1dc8a2d73089e30bb043d28d7c7ee19 100644 (file)
--- a/grep.c
+++ b/grep.c
@@ -4,6 +4,7 @@
 #include "grep.h"
 #include "hex.h"
 #include "object-store.h"
+#include "pretty.h"
 #include "userdiff.h"
 #include "xdiff-interface.h"
 #include "diff.h"
index 637a4e91f7aa4bc5e06ddc13663708e7e597a5a1..3f184986362f35fa2cd443cf278f953b2f18242d 100644 (file)
@@ -15,6 +15,7 @@
 #include "setup.h"
 #include "sigchain.h"
 #include "strvec.h"
+#include "tree.h"
 #include "packfile.h"
 #include "object-store.h"
 #include "commit-reach.h"
index b5cf3d8439ce833e7b668b5348ad94d3fb80e332..8861900b5928154e96c7324ad4f8ac1fe3357e88 100644 (file)
@@ -24,6 +24,7 @@
 #include "help.h"
 #include "range-diff.h"
 #include "strmap.h"
+#include "tree.h"
 #include "write-or-die.h"
 
 static struct decoration name_decoration = { "object names" };
index 2c47c5a623775f015002fad76ae644b65a6ed585..a5507533009abca90617b388f93a7e335049eb16 100644 (file)
@@ -3,6 +3,7 @@
 #include "hash.h"
 #include "merge-ort.h"
 #include "merge-ort-wrappers.h"
+#include "tree.h"
 
 #include "commit.h"
 
diff --git a/merge.c b/merge.c
index da7fa652c271b7990f5f6d1d82abb63dc8341261..10aaec3a6c1afca8fef4e3aac3dcd0d1cd2b9f63 100644 (file)
--- a/merge.c
+++ b/merge.c
@@ -7,6 +7,7 @@
 #include "commit.h"
 #include "run-command.h"
 #include "resolve-undo.h"
+#include "tree.h"
 #include "tree-walk.h"
 #include "unpack-trees.h"
 #include "dir.h"
index fbcdfd0dfe551211353c5c677ca97ff935341921..14288caf98f83ca27759e6061080fd9cf791e017 100644 (file)
@@ -1,6 +1,7 @@
 #include "git-compat-util.h"
 #include "notes-cache.h"
 #include "object-store.h"
+#include "pretty.h"
 #include "repository.h"
 #include "commit.h"
 #include "refs.h"
index cb88171b7bb9e6def420a63e91487d1671992d1b..4a793eb347f74bf031b69d9315d2c678793e4935 100644 (file)
@@ -6,6 +6,7 @@
 #include "refs.h"
 #include "notes-utils.h"
 #include "repository.h"
+#include "strbuf.h"
 
 void create_notes_commit(struct repository *r,
                         struct notes_tree *t,
index 3cd5b327293b2b30cb47ffd0b34418fea6800133..5ccbe854b6037aebb2b3c26de2a3c68b5085a9c4 100644 (file)
@@ -15,6 +15,7 @@
 #include "dir.h"
 #include "oid-array.h"
 #include "packfile.h"
+#include "pretty.h"
 #include "object-store.h"
 #include "repository.h"
 #include "setup.h"
index faf67c94d37e15914f248779f50207ffeb805b72..3d3fd380654e793f30493325332d815b198ad048 100644 (file)
@@ -18,6 +18,7 @@
 #include "commit-reach.h"
 #include "prio-queue.h"
 #include "trace2.h"
+#include "tree.h"
 
 struct bitmapped_commit {
        struct commit *commit;
index 26a4c7d08a9291b05f50bce1ca22e9868777a3d5..be81158f861d824315c616f244f36596ec69989e 100644 (file)
@@ -3,6 +3,7 @@
 #include "branch.h"
 #include "commit.h"
 #include "color.h"
+#include "date.h"
 #include "environment.h"
 #include "gettext.h"
 #include "object-name.h"
index b6803647d0eb84c6e4cdbbb3c053b8c082c0829c..f8a155ee13b9599e2de3f973d9f9744c9c045893 100644 (file)
@@ -5,6 +5,7 @@
 #include "commit.h"
 #include "color.h"
 #include "gettext.h"
+#include "strbuf.h"
 #include "utf8.h"
 
 static int disallow_abbreviated_options;
index b3e2917ddc95ad796d9d0c71e1a8c4c087340233..d64d93bc36491338629235378366302b1c8adf7e 100644 (file)
@@ -6,6 +6,7 @@
 #include "cache.h"
 #include "alloc.h"
 #include "config.h"
+#include "date.h"
 #include "diff.h"
 #include "diffcore.h"
 #include "hex.h"
index 594e66ad3612ee0925e78cf5d12f0db3a3b65ffa..84eee904ba38c01f445e370d1b10e7a11305cda5 100644 (file)
@@ -2,6 +2,7 @@
 #include "alloc.h"
 #include "environment.h"
 #include "gettext.h"
+#include "gpg-interface.h"
 #include "hex.h"
 #include "parse-options.h"
 #include "refs.h"
index 9c0944308849088e8b69596986fdefd13ee147db..57dc7c0d051ffc20e41326f00556797fe02af61e 100644 (file)
--- a/reflog.c
+++ b/reflog.c
@@ -4,6 +4,7 @@
 #include "reflog.h"
 #include "refs.h"
 #include "revision.h"
+#include "tree.h"
 #include "worktree.h"
 
 /* Remember to update object flag allocation in object.h */
index adc34c836fce48f34e811af27c04e79aa50e617b..6f11e6de46c8f2ed76d17a8bb8ac3bb2c5ba3acb 100644 (file)
@@ -1,6 +1,7 @@
 #include "git-compat-util.h"
 #include "hex.h"
 #include "refs-internal.h"
+#include "string-list.h"
 #include "trace.h"
 
 static struct trace_key trace_refs = TRACE_KEY_INIT(REFS);
index 31b61d782c7174ff8203db49d0329a8ffee7d3a2..57f6c2aaf9bf2ad4d66bcbbc87c7d778383f172c 100644 (file)
--- a/refspec.c
+++ b/refspec.c
@@ -6,6 +6,7 @@
 #include "strvec.h"
 #include "refs.h"
 #include "refspec.h"
+#include "strbuf.h"
 
 static struct refspec_item s_tag_refspec = {
        .force = 0,
index 742700504a73dd7f18b29aa88c3ca2a6010cda2b..6630bb2eae286f83aab2fae1bac69252659ecff5 100644 (file)
@@ -8,6 +8,7 @@
 #include "pretty.h"
 #include "diff.h"
 #include "commit-slab-decl.h"
+#include "decorate.h"
 #include "ident.h"
 #include "list-objects-filter-options.h"
 
index 351037b07bce434feb1407e34bad6a804772b15b..e68da24cc529dc7237183256736113ab2adcf996 100644 (file)
@@ -1,6 +1,7 @@
 #include "git-compat-util.h"
 #include "config.h"
 #include "commit.h"
+#include "date.h"
 #include "gettext.h"
 #include "hex.h"
 #include "refs.h"
index 97b9c1c035974c269f5b9d042155e196d8193b10..068b76ef6d9644c6f1e1576e425ac5339845e004 100644 (file)
@@ -22,6 +22,7 @@
 #include "strbuf.h"
 #include "trace.h"
 #include "trace2.h"
+#include "tree.h"
 #include "utf8.h"
 #include "worktree.h"
 #include "lockfile.h"