Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2024-01-09 01:05:15 +0300
committerJunio C Hamano <gitster@pobox.com>2024-01-09 01:05:15 +0300
commit492ee03f60297e7e83d101f4519ab8abc98782bc (patch)
tree05800113e2443a2b1ec4771f38f2f3904528e5a9
parent9decd56cc9a41773bffa517caaa07db3f78e8646 (diff)
parentd57c671a511d885a5cd390e3d6064c37af524a91 (diff)
Merge branch 'en/header-cleanup'
Remove unused header "#include". * en/header-cleanup: treewide: remove unnecessary includes in source files treewide: add direct includes currently only pulled in transitively trace2/tr2_tls.h: remove unnecessary include submodule-config.h: remove unnecessary include pkt-line.h: remove unnecessary include line-log.h: remove unnecessary include http.h: remove unnecessary include fsmonitor--daemon.h: remove unnecessary includes blame.h: remove unnecessary includes archive.h: remove unnecessary include treewide: remove unnecessary includes in source files treewide: remove unnecessary includes from header files
-rw-r--r--add-patch.c1
-rw-r--r--apply.c1
-rw-r--r--archive-tar.c1
-rw-r--r--archive-zip.c1
-rw-r--r--archive.c2
-rw-r--r--archive.h1
-rw-r--r--bisect.c1
-rw-r--r--blame.c2
-rw-r--r--blame.h3
-rw-r--r--blob.c1
-rw-r--r--bloom.c1
-rw-r--r--builtin/add.c3
-rw-r--r--builtin/am.c4
-rw-r--r--builtin/apply.c1
-rw-r--r--builtin/archive.c1
-rw-r--r--builtin/bisect.c1
-rw-r--r--builtin/blame.c1
-rw-r--r--builtin/branch.c3
-rw-r--r--builtin/cat-file.c1
-rw-r--r--builtin/checkout-index.c1
-rw-r--r--builtin/checkout.c3
-rw-r--r--builtin/clone.c1
-rw-r--r--builtin/commit-graph.c3
-rw-r--r--builtin/commit-tree.c3
-rw-r--r--builtin/commit.c8
-rw-r--r--builtin/credential-cache.c2
-rw-r--r--builtin/describe.c2
-rw-r--r--builtin/diff-files.c1
-rw-r--r--builtin/diff-index.c2
-rw-r--r--builtin/diff-tree.c1
-rw-r--r--builtin/diff.c2
-rw-r--r--builtin/difftool.c1
-rw-r--r--builtin/fast-export.c1
-rw-r--r--builtin/fetch.c2
-rw-r--r--builtin/for-each-ref.c3
-rw-r--r--builtin/fsck.c3
-rw-r--r--builtin/fsmonitor--daemon.c5
-rw-r--r--builtin/get-tar-commit-id.c1
-rw-r--r--builtin/grep.c4
-rw-r--r--builtin/hash-object.c1
-rw-r--r--builtin/hook.c1
-rw-r--r--builtin/index-pack.c2
-rw-r--r--builtin/init-db.c1
-rw-r--r--builtin/log.c2
-rw-r--r--builtin/ls-files.c4
-rw-r--r--builtin/ls-remote.c1
-rw-r--r--builtin/ls-tree.c2
-rw-r--r--builtin/mailinfo.c1
-rw-r--r--builtin/merge-base.c3
-rw-r--r--builtin/merge-recursive.c3
-rw-r--r--builtin/merge-tree.c1
-rw-r--r--builtin/merge.c4
-rw-r--r--builtin/mktag.c1
-rw-r--r--builtin/mv.c1
-rw-r--r--builtin/notes.c2
-rw-r--r--builtin/pack-objects.c3
-rw-r--r--builtin/pull.c5
-rw-r--r--builtin/push.c1
-rw-r--r--builtin/range-diff.c1
-rw-r--r--builtin/read-tree.c2
-rw-r--r--builtin/rebase.c4
-rw-r--r--builtin/receive-pack.c1
-rw-r--r--builtin/repack.c1
-rw-r--r--builtin/rerere.c1
-rw-r--r--builtin/reset.c3
-rw-r--r--builtin/rev-list.c2
-rw-r--r--builtin/revert.c2
-rw-r--r--builtin/rm.c1
-rw-r--r--builtin/send-pack.c5
-rw-r--r--builtin/show-ref.c1
-rw-r--r--builtin/sparse-checkout.c4
-rw-r--r--builtin/stash.c1
-rw-r--r--builtin/submodule--helper.c1
-rw-r--r--builtin/tag.c1
-rw-r--r--builtin/unpack-objects.c4
-rw-r--r--builtin/update-ref.c1
-rw-r--r--builtin/verify-commit.c2
-rw-r--r--builtin/verify-tag.c1
-rw-r--r--bulk-checkin.c1
-rw-r--r--bundle-uri.c1
-rw-r--r--cache-tree.c1
-rw-r--r--combine-diff.c1
-rw-r--r--commit-graph.c3
-rw-r--r--commit-reach.c1
-rw-r--r--commit.c2
-rw-r--r--compat/fsmonitor/fsm-health-win32.c1
-rw-r--r--compat/fsmonitor/fsm-listen-darwin.c1
-rw-r--r--compat/fsmonitor/fsm-listen-win32.c1
-rw-r--r--compat/simple-ipc/ipc-shared.c3
-rw-r--r--compat/simple-ipc/ipc-unix-socket.c1
-rw-r--r--config.c3
-rw-r--r--delta-islands.c5
-rw-r--r--diff-lib.c1
-rw-r--r--diff-no-index.c3
-rw-r--r--diff.c2
-rw-r--r--diffcore-break.c1
-rw-r--r--diffcore-delta.c1
-rw-r--r--dir.c1
-rw-r--r--entry.c1
-rw-r--r--exec-cmd.c1
-rw-r--r--fetch-pack.c2
-rw-r--r--fetch-pack.h1
-rw-r--r--fsck.c1
-rw-r--r--fsmonitor--daemon.h4
-rw-r--r--fsmonitor-ipc.c1
-rw-r--r--gettext.c2
-rw-r--r--gpg-interface.c1
-rw-r--r--grep.c1
-rw-r--r--http-fetch.c2
-rw-r--r--http-push.c3
-rw-r--r--http-walker.c1
-rw-r--r--http.c2
-rw-r--r--http.h1
-rw-r--r--imap-send.c2
-rw-r--r--line-log.c4
-rw-r--r--line-log.h2
-rw-r--r--line-range.c1
-rw-r--r--list-objects-filter-options.c5
-rw-r--r--list-objects-filter.c5
-rw-r--r--log-tree.c1
-rw-r--r--ls-refs.c1
-rw-r--r--merge-blobs.c2
-rw-r--r--merge-ort.c3
-rw-r--r--merge-recursive.c5
-rw-r--r--merge.c3
-rw-r--r--midx.h1
-rw-r--r--negotiator/noop.c1
-rw-r--r--notes-utils.c1
-rw-r--r--notes.c2
-rw-r--r--object-file.c8
-rw-r--r--object-name.c2
-rw-r--r--pack-bitmap-write.c3
-rw-r--r--pack-check.c1
-rw-r--r--pack-write.c1
-rw-r--r--packfile.c1
-rw-r--r--parse-options.c2
-rw-r--r--patch-ids.c1
-rw-r--r--pkt-line.c1
-rw-r--r--pkt-line.h1
-rw-r--r--protocol-caps.c1
-rw-r--r--reachable.c1
-rw-r--r--read-cache.c2
-rw-r--r--ref-filter.c3
-rw-r--r--ref-filter.h1
-rw-r--r--reflog.c1
-rw-r--r--refs/files-backend.c2
-rw-r--r--refs/packed-backend.c1
-rw-r--r--refs/ref-cache.c1
-rw-r--r--reftable/dump.c2
-rw-r--r--reftable/generic.c1
-rw-r--r--reftable/merged.c1
-rw-r--r--reftable/merged_test.c1
-rw-r--r--reftable/reader.c1
-rw-r--r--reftable/readwrite_test.c1
-rw-r--r--reftable/refname_test.c1
-rw-r--r--reftable/stack_test.c1
-rw-r--r--reftable/test_framework.c1
-rw-r--r--reftable/tree_test.c2
-rw-r--r--remote-curl.c3
-rw-r--r--remote.c1
-rw-r--r--repo-settings.c1
-rw-r--r--rerere.c2
-rw-r--r--reset.c1
-rw-r--r--revision.c2
-rw-r--r--run-command.c2
-rw-r--r--send-pack.c2
-rw-r--r--sequencer.c3
-rw-r--r--setup.c1
-rw-r--r--shallow.c1
-rw-r--r--shell.c1
-rw-r--r--submodule-config.h2
-rw-r--r--submodule.c3
-rw-r--r--t/helper/test-bundle-uri.c2
-rw-r--r--t/helper/test-pkt-line.c1
-rw-r--r--t/helper/test-reach.c2
-rw-r--r--t/helper/test-repository.c2
-rw-r--r--t/helper/test-simple-ipc.c1
-rw-r--r--t/helper/test-submodule.c1
-rw-r--r--tmp-objdir.c1
-rw-r--r--trace2.c3
-rw-r--r--trace2/tr2_ctr.c1
-rw-r--r--trace2/tr2_tgt_normal.c1
-rw-r--r--trace2/tr2_tls.c1
-rw-r--r--trace2/tr2_tls.h1
-rw-r--r--trace2/tr2_tmr.c1
-rw-r--r--transport-helper.c2
-rw-r--r--transport.c3
-rw-r--r--tree.c3
-rw-r--r--upload-pack.c6
-rw-r--r--wrapper.c1
-rw-r--r--xdiff-interface.c2
191 files changed, 25 insertions, 335 deletions
diff --git a/add-patch.c b/add-patch.c
index bfe19876cd..79eda168eb 100644
--- a/add-patch.c
+++ b/add-patch.c
@@ -12,7 +12,6 @@
#include "strvec.h"
#include "pathspec.h"
#include "color.h"
-#include "diff.h"
#include "compat/terminal.h"
#include "prompt.h"
diff --git a/apply.c b/apply.c
index 3d69fec836..7608e3301c 100644
--- a/apply.c
+++ b/apply.c
@@ -12,7 +12,6 @@
#include "base85.h"
#include "config.h"
#include "object-store-ll.h"
-#include "blob.h"
#include "delta.h"
#include "diff.h"
#include "dir.h"
diff --git a/archive-tar.c b/archive-tar.c
index 0726996839..f2a0ed7752 100644
--- a/archive-tar.c
+++ b/archive-tar.c
@@ -9,6 +9,7 @@
#include "tar.h"
#include "archive.h"
#include "object-store-ll.h"
+#include "strbuf.h"
#include "streaming.h"
#include "run-command.h"
#include "write-or-die.h"
diff --git a/archive-zip.c b/archive-zip.c
index 7229e3e454..fd1d3f816d 100644
--- a/archive-zip.c
+++ b/archive-zip.c
@@ -10,6 +10,7 @@
#include "streaming.h"
#include "utf8.h"
#include "object-store-ll.h"
+#include "strbuf.h"
#include "userdiff.h"
#include "write-or-die.h"
#include "xdiff-interface.h"
diff --git a/archive.c b/archive.c
index 8da820d1ce..a6730bebfa 100644
--- a/archive.c
+++ b/archive.c
@@ -5,6 +5,7 @@
#include "environment.h"
#include "gettext.h"
#include "hex.h"
+#include "object-name.h"
#include "path.h"
#include "pretty.h"
#include "setup.h"
@@ -17,7 +18,6 @@
#include "archive.h"
#include "parse-options.h"
#include "unpack-trees.h"
-#include "dir.h"
#include "quote.h"
static char const * const archive_usage[] = {
diff --git a/archive.h b/archive.h
index 3a4bdfbd07..bbe65ba0f9 100644
--- a/archive.h
+++ b/archive.h
@@ -1,7 +1,6 @@
#ifndef ARCHIVE_H
#define ARCHIVE_H
-#include "object-name.h"
#include "pathspec.h"
#include "string-list.h"
diff --git a/bisect.c b/bisect.c
index 985b96ed13..f1273c787d 100644
--- a/bisect.c
+++ b/bisect.c
@@ -9,7 +9,6 @@
#include "refs.h"
#include "list-objects.h"
#include "quote.h"
-#include "hash-lookup.h"
#include "run-command.h"
#include "log-tree.h"
#include "bisect.h"
diff --git a/blame.c b/blame.c
index 141756975b..1a16d4eb6a 100644
--- a/blame.c
+++ b/blame.c
@@ -3,6 +3,7 @@
#include "object-store-ll.h"
#include "cache-tree.h"
#include "mergesort.h"
+#include "commit.h"
#include "convert.h"
#include "diff.h"
#include "diffcore.h"
@@ -10,6 +11,7 @@
#include "hex.h"
#include "path.h"
#include "read-cache.h"
+#include "revision.h"
#include "setup.h"
#include "tag.h"
#include "trace2.h"
diff --git a/blame.h b/blame.h
index 31ddc85f19..5b4e47d44c 100644
--- a/blame.h
+++ b/blame.h
@@ -1,12 +1,9 @@
#ifndef BLAME_H
#define BLAME_H
-#include "commit.h"
#include "oidset.h"
#include "xdiff-interface.h"
-#include "revision.h"
#include "prio-queue.h"
-#include "diff.h"
#define PICKAXE_BLAME_MOVE 01
#define PICKAXE_BLAME_COPY 02
diff --git a/blob.c b/blob.c
index 888e28a559..3fb2922b1a 100644
--- a/blob.c
+++ b/blob.c
@@ -1,6 +1,5 @@
#include "git-compat-util.h"
#include "blob.h"
-#include "repository.h"
#include "alloc.h"
const char *blob_type = "blob";
diff --git a/bloom.c b/bloom.c
index 1474aa19fa..e529f7605c 100644
--- a/bloom.c
+++ b/bloom.c
@@ -2,7 +2,6 @@
#include "bloom.h"
#include "diff.h"
#include "diffcore.h"
-#include "revision.h"
#include "hashmap.h"
#include "commit-graph.h"
#include "commit.h"
diff --git a/builtin/add.c b/builtin/add.c
index d46e4d10e9..ada7719561 100644
--- a/builtin/add.c
+++ b/builtin/add.c
@@ -12,14 +12,11 @@
#include "dir.h"
#include "gettext.h"
#include "pathspec.h"
-#include "exec-cmd.h"
-#include "cache-tree.h"
#include "run-command.h"
#include "parse-options.h"
#include "path.h"
#include "preload-index.h"
#include "diff.h"
-#include "diffcore.h"
#include "read-cache.h"
#include "repository.h"
#include "revision.h"
diff --git a/builtin/am.c b/builtin/am.c
index 9f084d58bc..d1990d7edc 100644
--- a/builtin/am.c
+++ b/builtin/am.c
@@ -10,7 +10,6 @@
#include "config.h"
#include "editor.h"
#include "environment.h"
-#include "exec-cmd.h"
#include "gettext.h"
#include "hex.h"
#include "parse-options.h"
@@ -24,7 +23,6 @@
#include "refs.h"
#include "commit.h"
#include "diff.h"
-#include "diffcore.h"
#include "unpack-trees.h"
#include "branch.h"
#include "object-name.h"
@@ -35,11 +33,9 @@
#include "log-tree.h"
#include "notes-utils.h"
#include "rerere.h"
-#include "prompt.h"
#include "mailinfo.h"
#include "apply.h"
#include "string-list.h"
-#include "packfile.h"
#include "pager.h"
#include "path.h"
#include "repository.h"
diff --git a/builtin/apply.c b/builtin/apply.c
index c18b7ea5d3..861a01910c 100644
--- a/builtin/apply.c
+++ b/builtin/apply.c
@@ -1,6 +1,5 @@
#include "builtin.h"
#include "gettext.h"
-#include "parse-options.h"
#include "repository.h"
#include "apply.h"
diff --git a/builtin/archive.c b/builtin/archive.c
index 90761fdfee..15ee1ec7bb 100644
--- a/builtin/archive.c
+++ b/builtin/archive.c
@@ -9,7 +9,6 @@
#include "parse-options.h"
#include "pkt-line.h"
#include "repository.h"
-#include "sideband.h"
static void create_output_file(const char *output_file)
{
diff --git a/builtin/bisect.c b/builtin/bisect.c
index 47fcce59ff..f69c3f7e43 100644
--- a/builtin/bisect.c
+++ b/builtin/bisect.c
@@ -7,7 +7,6 @@
#include "parse-options.h"
#include "bisect.h"
#include "refs.h"
-#include "dir.h"
#include "strvec.h"
#include "run-command.h"
#include "oid-array.h"
diff --git a/builtin/blame.c b/builtin/blame.c
index 2433b7da5c..db1f56de61 100644
--- a/builtin/blame.c
+++ b/builtin/blame.c
@@ -25,7 +25,6 @@
#include "userdiff.h"
#include "line-range.h"
#include "line-log.h"
-#include "dir.h"
#include "progress.h"
#include "object-name.h"
#include "object-store-ll.h"
diff --git a/builtin/branch.c b/builtin/branch.c
index 2ed59f16f1..0a32d1b6c8 100644
--- a/builtin/branch.c
+++ b/builtin/branch.c
@@ -17,13 +17,10 @@
#include "remote.h"
#include "parse-options.h"
#include "branch.h"
-#include "diff.h"
#include "path.h"
-#include "revision.h"
#include "string-list.h"
#include "column.h"
#include "utf8.h"
-#include "wt-status.h"
#include "ref-filter.h"
#include "worktree.h"
#include "help.h"
diff --git a/builtin/cat-file.c b/builtin/cat-file.c
index ea8ad601ec..7d4899348a 100644
--- a/builtin/cat-file.c
+++ b/builtin/cat-file.c
@@ -15,7 +15,6 @@
#include "parse-options.h"
#include "userdiff.h"
#include "streaming.h"
-#include "tree-walk.h"
#include "oid-array.h"
#include "packfile.h"
#include "object-file.h"
diff --git a/builtin/checkout-index.c b/builtin/checkout-index.c
index 3b68b47615..2e086a204d 100644
--- a/builtin/checkout-index.c
+++ b/builtin/checkout-index.c
@@ -7,7 +7,6 @@
#define USE_THE_INDEX_VARIABLE
#include "builtin.h"
#include "config.h"
-#include "dir.h"
#include "gettext.h"
#include "lockfile.h"
#include "quote.h"
diff --git a/builtin/checkout.c b/builtin/checkout.c
index a1e09690cd..a6e30931b5 100644
--- a/builtin/checkout.c
+++ b/builtin/checkout.c
@@ -1,7 +1,6 @@
#define USE_THE_INDEX_VARIABLE
#include "builtin.h"
#include "advice.h"
-#include "blob.h"
#include "branch.h"
#include "cache-tree.h"
#include "checkout.h"
@@ -27,10 +26,8 @@
#include "remote.h"
#include "resolve-undo.h"
#include "revision.h"
-#include "run-command.h"
#include "setup.h"
#include "submodule.h"
-#include "submodule-config.h"
#include "symlinks.h"
#include "trace2.h"
#include "tree.h"
diff --git a/builtin/clone.c b/builtin/clone.c
index 343f536cf8..0605fa79aa 100644
--- a/builtin/clone.c
+++ b/builtin/clone.c
@@ -19,7 +19,6 @@
#include "hex.h"
#include "lockfile.h"
#include "parse-options.h"
-#include "fetch-pack.h"
#include "refs.h"
#include "refspec.h"
#include "object-file.h"
diff --git a/builtin/commit-graph.c b/builtin/commit-graph.c
index 45d035af60..666ad574a4 100644
--- a/builtin/commit-graph.c
+++ b/builtin/commit-graph.c
@@ -1,17 +1,16 @@
#include "builtin.h"
#include "commit.h"
#include "config.h"
-#include "dir.h"
#include "environment.h"
#include "gettext.h"
#include "hex.h"
-#include "lockfile.h"
#include "parse-options.h"
#include "repository.h"
#include "commit-graph.h"
#include "object-store-ll.h"
#include "progress.h"
#include "replace-object.h"
+#include "strbuf.h"
#include "tag.h"
#include "trace2.h"
diff --git a/builtin/commit-tree.c b/builtin/commit-tree.c
index 02625e7176..1bb7819839 100644
--- a/builtin/commit-tree.c
+++ b/builtin/commit-tree.c
@@ -11,9 +11,6 @@
#include "object-store-ll.h"
#include "repository.h"
#include "commit.h"
-#include "tree.h"
-#include "utf8.h"
-#include "gpg-interface.h"
#include "parse-options.h"
static const char * const commit_tree_usage[] = {
diff --git a/builtin/commit.c b/builtin/commit.c
index bf71fdaa7c..65196a2827 100644
--- a/builtin/commit.c
+++ b/builtin/commit.c
@@ -16,17 +16,12 @@
#include "editor.h"
#include "environment.h"
#include "diff.h"
-#include "diffcore.h"
#include "commit.h"
#include "gettext.h"
#include "revision.h"
#include "wt-status.h"
#include "run-command.h"
-#include "hook.h"
-#include "refs.h"
-#include "log-tree.h"
#include "strbuf.h"
-#include "utf8.h"
#include "object-name.h"
#include "parse-options.h"
#include "path.h"
@@ -35,9 +30,6 @@
#include "string-list.h"
#include "rerere.h"
#include "unpack-trees.h"
-#include "quote.h"
-#include "submodule.h"
-#include "gpg-interface.h"
#include "column.h"
#include "sequencer.h"
#include "sparse-index.h"
diff --git a/builtin/credential-cache.c b/builtin/credential-cache.c
index 43b9d0e5b1..bba96d4ffd 100644
--- a/builtin/credential-cache.c
+++ b/builtin/credential-cache.c
@@ -7,8 +7,6 @@
#ifndef NO_UNIX_SOCKETS
-#include "credential.h"
-#include "string-list.h"
#include "unix-socket.h"
#include "run-command.h"
diff --git a/builtin/describe.c b/builtin/describe.c
index fb6b0508f3..d6c77a714f 100644
--- a/builtin/describe.c
+++ b/builtin/describe.c
@@ -7,9 +7,7 @@
#include "lockfile.h"
#include "commit.h"
#include "tag.h"
-#include "blob.h"
#include "refs.h"
-#include "exec-cmd.h"
#include "object-name.h"
#include "parse-options.h"
#include "read-cache-ll.h"
diff --git a/builtin/diff-files.c b/builtin/diff-files.c
index f38912cd40..018011f29e 100644
--- a/builtin/diff-files.c
+++ b/builtin/diff-files.c
@@ -11,7 +11,6 @@
#include "preload-index.h"
#include "repository.h"
#include "revision.h"
-#include "submodule.h"
static const char diff_files_usage[] =
"git diff-files [-q] [-0 | -1 | -2 | -3 | -c | --cc] [<common-diff-options>] [<path>...]"
diff --git a/builtin/diff-index.c b/builtin/diff-index.c
index 220f341ffa..3e05260ac0 100644
--- a/builtin/diff-index.c
+++ b/builtin/diff-index.c
@@ -7,8 +7,6 @@
#include "repository.h"
#include "revision.h"
#include "setup.h"
-#include "sparse-index.h"
-#include "submodule.h"
static const char diff_cache_usage[] =
"git diff-index [-m] [--cached] [--merge-base] "
diff --git a/builtin/diff-tree.c b/builtin/diff-tree.c
index 86be634286..a8e68ce8ef 100644
--- a/builtin/diff-tree.c
+++ b/builtin/diff-tree.c
@@ -6,7 +6,6 @@
#include "gettext.h"
#include "hex.h"
#include "log-tree.h"
-#include "submodule.h"
#include "read-cache-ll.h"
#include "repository.h"
#include "revision.h"
diff --git a/builtin/diff.c b/builtin/diff.c
index 55e7d21755..6e196e0c7d 100644
--- a/builtin/diff.c
+++ b/builtin/diff.c
@@ -10,7 +10,6 @@
#include "lockfile.h"
#include "color.h"
#include "commit.h"
-#include "blob.h"
#include "gettext.h"
#include "tag.h"
#include "diff.h"
@@ -21,7 +20,6 @@
#include "revision.h"
#include "log-tree.h"
#include "setup.h"
-#include "submodule.h"
#include "oid-array.h"
#include "tree.h"
diff --git a/builtin/difftool.c b/builtin/difftool.c
index 0f5eae9cd4..a3c72b8258 100644
--- a/builtin/difftool.c
+++ b/builtin/difftool.c
@@ -18,7 +18,6 @@
#include "copy.h"
#include "run-command.h"
#include "environment.h"
-#include "exec-cmd.h"
#include "gettext.h"
#include "hex.h"
#include "parse-options.h"
diff --git a/builtin/fast-export.c b/builtin/fast-export.c
index 70aff515ac..f18f0809f9 100644
--- a/builtin/fast-export.c
+++ b/builtin/fast-export.c
@@ -25,7 +25,6 @@
#include "quote.h"
#include "remote.h"
#include "blob.h"
-#include "commit-slab.h"
static const char *fast_export_usage[] = {
N_("git fast-export [<rev-list-opts>]"),
diff --git a/builtin/fetch.c b/builtin/fetch.c
index a284b970ef..119f1a72ac 100644
--- a/builtin/fetch.c
+++ b/builtin/fetch.c
@@ -26,7 +26,6 @@
#include "connected.h"
#include "strvec.h"
#include "utf8.h"
-#include "packfile.h"
#include "pager.h"
#include "path.h"
#include "pkt-line.h"
@@ -38,7 +37,6 @@
#include "shallow.h"
#include "trace.h"
#include "trace2.h"
-#include "worktree.h"
#include "bundle-uri.h"
#define FORCED_UPDATES_DELAY_WARNING_IN_MS (10 * 1000)
diff --git a/builtin/for-each-ref.c b/builtin/for-each-ref.c
index 1c19cd5bd3..3885a9c28e 100644
--- a/builtin/for-each-ref.c
+++ b/builtin/for-each-ref.c
@@ -1,13 +1,12 @@
#include "builtin.h"
+#include "commit.h"
#include "config.h"
#include "gettext.h"
-#include "refs.h"
#include "object.h"
#include "parse-options.h"
#include "ref-filter.h"
#include "strbuf.h"
#include "strvec.h"
-#include "commit-reach.h"
static char const * const for_each_ref_usage[] = {
N_("git for-each-ref [<options>] [<pattern>]"),
diff --git a/builtin/fsck.c b/builtin/fsck.c
index 611925905e..a7cf94f67e 100644
--- a/builtin/fsck.c
+++ b/builtin/fsck.c
@@ -10,13 +10,10 @@
#include "refs.h"
#include "pack.h"
#include "cache-tree.h"
-#include "tree-walk.h"
#include "fsck.h"
#include "parse-options.h"
-#include "dir.h"
#include "progress.h"
#include "streaming.h"
-#include "decorate.h"
#include "packfile.h"
#include "object-file.h"
#include "object-name.h"
diff --git a/builtin/fsmonitor--daemon.c b/builtin/fsmonitor--daemon.c
index 5d01db5c02..1593713f4c 100644
--- a/builtin/fsmonitor--daemon.c
+++ b/builtin/fsmonitor--daemon.c
@@ -1,19 +1,20 @@
#include "builtin.h"
#include "abspath.h"
#include "config.h"
+#include "dir.h"
#include "environment.h"
#include "gettext.h"
#include "parse-options.h"
#include "fsmonitor-ll.h"
#include "fsmonitor-ipc.h"
-#include "fsmonitor-path-utils.h"
#include "fsmonitor-settings.h"
#include "compat/fsmonitor/fsm-health.h"
#include "compat/fsmonitor/fsm-listen.h"
#include "fsmonitor--daemon.h"
+#include "repository.h"
#include "simple-ipc.h"
#include "khash.h"
-#include "pkt-line.h"
+#include "run-command.h"
#include "trace.h"
#include "trace2.h"
diff --git a/builtin/get-tar-commit-id.c b/builtin/get-tar-commit-id.c
index 20d0dfe9cf..66a7389f9f 100644
--- a/builtin/get-tar-commit-id.c
+++ b/builtin/get-tar-commit-id.c
@@ -4,7 +4,6 @@
#include "builtin.h"
#include "commit.h"
#include "tar.h"
-#include "quote.h"
static const char builtin_get_tar_commit_id_usage[] =
"git get-tar-commit-id";
diff --git a/builtin/grep.c b/builtin/grep.c
index fe78d4c98b..c8e33f9775 100644
--- a/builtin/grep.c
+++ b/builtin/grep.c
@@ -9,15 +9,11 @@
#include "hex.h"
#include "repository.h"
#include "config.h"
-#include "blob.h"
-#include "tree.h"
-#include "commit.h"
#include "tag.h"
#include "tree-walk.h"
#include "parse-options.h"
#include "string-list.h"
#include "run-command.h"
-#include "userdiff.h"
#include "grep.h"
#include "quote.h"
#include "dir.h"
diff --git a/builtin/hash-object.c b/builtin/hash-object.c
index 5ffec99dce..82ca6d2bfd 100644
--- a/builtin/hash-object.c
+++ b/builtin/hash-object.c
@@ -14,7 +14,6 @@
#include "blob.h"
#include "quote.h"
#include "parse-options.h"
-#include "exec-cmd.h"
#include "setup.h"
#include "strbuf.h"
#include "write-or-die.h"
diff --git a/builtin/hook.c b/builtin/hook.c
index 09b51a6487..5234693a94 100644
--- a/builtin/hook.c
+++ b/builtin/hook.c
@@ -3,7 +3,6 @@
#include "gettext.h"
#include "hook.h"
#include "parse-options.h"
-#include "strbuf.h"
#include "strvec.h"
#define BUILTIN_HOOK_RUN_USAGE \
diff --git a/builtin/index-pack.c b/builtin/index-pack.c
index dda94a9f46..0841b6940a 100644
--- a/builtin/index-pack.c
+++ b/builtin/index-pack.c
@@ -8,11 +8,9 @@
#include "csum-file.h"
#include "blob.h"
#include "commit.h"
-#include "tag.h"
#include "tree.h"
#include "progress.h"
#include "fsck.h"
-#include "exec-cmd.h"
#include "strbuf.h"
#include "streaming.h"
#include "thread-utils.h"
diff --git a/builtin/init-db.c b/builtin/init-db.c
index cb727c826f..b89814a6f8 100644
--- a/builtin/init-db.c
+++ b/builtin/init-db.c
@@ -5,7 +5,6 @@
*/
#include "builtin.h"
#include "abspath.h"
-#include "config.h"
#include "environment.h"
#include "gettext.h"
#include "object-file.h"
diff --git a/builtin/log.c b/builtin/log.c
index 1f61a388cf..db1808d7c1 100644
--- a/builtin/log.c
+++ b/builtin/log.c
@@ -26,7 +26,6 @@
#include "tag.h"
#include "reflog-walk.h"
#include "patch-ids.h"
-#include "run-command.h"
#include "shortlog.h"
#include "remote.h"
#include "string-list.h"
@@ -36,7 +35,6 @@
#include "streaming.h"
#include "version.h"
#include "mailmap.h"
-#include "gpg-interface.h"
#include "progress.h"
#include "commit-slab.h"
#include "repository.h"
diff --git a/builtin/ls-files.c b/builtin/ls-files.c
index a0229c3277..92f94e65bf 100644
--- a/builtin/ls-files.c
+++ b/builtin/ls-files.c
@@ -14,19 +14,15 @@
#include "gettext.h"
#include "object-name.h"
#include "strbuf.h"
-#include "tree.h"
-#include "cache-tree.h"
#include "parse-options.h"
#include "resolve-undo.h"
#include "string-list.h"
#include "path.h"
#include "pathspec.h"
#include "read-cache.h"
-#include "run-command.h"
#include "setup.h"
#include "sparse-index.h"
#include "submodule.h"
-#include "submodule-config.h"
#include "object-store.h"
#include "hex.h"
diff --git a/builtin/ls-remote.c b/builtin/ls-remote.c
index b416602b4d..e8d65ebbdc 100644
--- a/builtin/ls-remote.c
+++ b/builtin/ls-remote.c
@@ -5,7 +5,6 @@
#include "pkt-line.h"
#include "ref-filter.h"
#include "remote.h"
-#include "refs.h"
#include "parse-options.h"
#include "wildmatch.h"
diff --git a/builtin/ls-tree.c b/builtin/ls-tree.c
index 209d2dc0d5..e4a891337c 100644
--- a/builtin/ls-tree.c
+++ b/builtin/ls-tree.c
@@ -9,9 +9,7 @@
#include "hex.h"
#include "object-name.h"
#include "object-store-ll.h"
-#include "blob.h"
#include "tree.h"
-#include "commit.h"
#include "path.h"
#include "quote.h"
#include "parse-options.h"
diff --git a/builtin/mailinfo.c b/builtin/mailinfo.c
index 53b55dd71c..53a22645da 100644
--- a/builtin/mailinfo.c
+++ b/builtin/mailinfo.c
@@ -6,7 +6,6 @@
#include "abspath.h"
#include "environment.h"
#include "gettext.h"
-#include "utf8.h"
#include "strbuf.h"
#include "mailinfo.h"
#include "parse-options.h"
diff --git a/builtin/merge-base.c b/builtin/merge-base.c
index e68b7fe45d..d26e8fbf6f 100644
--- a/builtin/merge-base.c
+++ b/builtin/merge-base.c
@@ -3,9 +3,6 @@
#include "commit.h"
#include "gettext.h"
#include "hex.h"
-#include "refs.h"
-#include "diff.h"
-#include "revision.h"
#include "object-name.h"
#include "parse-options.h"
#include "repository.h"
diff --git a/builtin/merge-recursive.c b/builtin/merge-recursive.c
index 3366699657..c2ce044a20 100644
--- a/builtin/merge-recursive.c
+++ b/builtin/merge-recursive.c
@@ -1,13 +1,10 @@
#include "builtin.h"
#include "advice.h"
-#include "commit.h"
#include "gettext.h"
#include "hash.h"
-#include "tag.h"
#include "merge-recursive.h"
#include "object-name.h"
#include "repository.h"
-#include "xdiff-interface.h"
static const char builtin_merge_recursive_usage[] =
"git %s <base>... -- <head> <remote> ...";
diff --git a/builtin/merge-tree.c b/builtin/merge-tree.c
index a4aa6013c5..3bdec53fbe 100644
--- a/builtin/merge-tree.c
+++ b/builtin/merge-tree.c
@@ -13,7 +13,6 @@
#include "parse-options.h"
#include "repository.h"
#include "blob.h"
-#include "exec-cmd.h"
#include "merge-blobs.h"
#include "quote.h"
#include "tree.h"
diff --git a/builtin/merge.c b/builtin/merge.c
index f837483312..ebbe05033e 100644
--- a/builtin/merge.c
+++ b/builtin/merge.c
@@ -31,8 +31,6 @@
#include "unpack-trees.h"
#include "cache-tree.h"
#include "dir.h"
-#include "utf8.h"
-#include "log-tree.h"
#include "color.h"
#include "rerere.h"
#include "help.h"
@@ -42,10 +40,8 @@
#include "resolve-undo.h"
#include "remote.h"
#include "fmt-merge-msg.h"
-#include "gpg-interface.h"
#include "sequencer.h"
#include "string-list.h"
-#include "packfile.h"
#include "tag.h"
#include "alias.h"
#include "branch.h"
diff --git a/builtin/mktag.c b/builtin/mktag.c
index d8e0b5afc0..4767f1a97e 100644
--- a/builtin/mktag.c
+++ b/builtin/mktag.c
@@ -3,7 +3,6 @@
#include "hex.h"
#include "parse-options.h"
#include "strbuf.h"
-#include "tag.h"
#include "replace-object.h"
#include "object-file.h"
#include "object-store-ll.h"
diff --git a/builtin/mv.c b/builtin/mv.c
index c596515ad0..22e64fc290 100644
--- a/builtin/mv.c
+++ b/builtin/mv.c
@@ -15,7 +15,6 @@
#include "pathspec.h"
#include "lockfile.h"
#include "dir.h"
-#include "cache-tree.h"
#include "string-list.h"
#include "parse-options.h"
#include "read-cache-ll.h"
diff --git a/builtin/notes.c b/builtin/notes.c
index 9f38863dd5..e65cae0bcf 100644
--- a/builtin/notes.c
+++ b/builtin/notes.c
@@ -9,7 +9,6 @@
#include "builtin.h"
#include "config.h"
-#include "alloc.h"
#include "editor.h"
#include "environment.h"
#include "gettext.h"
@@ -19,7 +18,6 @@
#include "object-store-ll.h"
#include "path.h"
#include "repository.h"
-#include "blob.h"
#include "pretty.h"
#include "refs.h"
#include "exec-cmd.h"
diff --git a/builtin/pack-objects.c b/builtin/pack-objects.c
index 62c540b4db..5c8bfe1035 100644
--- a/builtin/pack-objects.c
+++ b/builtin/pack-objects.c
@@ -6,10 +6,8 @@
#include "config.h"
#include "attr.h"
#include "object.h"
-#include "blob.h"
#include "commit.h"
#include "tag.h"
-#include "tree.h"
#include "delta.h"
#include "pack.h"
#include "pack-revindex.h"
@@ -18,7 +16,6 @@
#include "diff.h"
#include "revision.h"
#include "list-objects.h"
-#include "list-objects-filter.h"
#include "list-objects-filter-options.h"
#include "pack-objects.h"
#include "progress.h"
diff --git a/builtin/pull.c b/builtin/pull.c
index be2b2c9ebc..73a68b75b0 100644
--- a/builtin/pull.c
+++ b/builtin/pull.c
@@ -14,7 +14,6 @@
#include "merge.h"
#include "object-name.h"
#include "parse-options.h"
-#include "exec-cmd.h"
#include "run-command.h"
#include "oid-array.h"
#include "remote.h"
@@ -24,15 +23,11 @@
#include "rebase.h"
#include "refs.h"
#include "refspec.h"
-#include "revision.h"
#include "submodule.h"
#include "submodule-config.h"
-#include "tempfile.h"
-#include "lockfile.h"
#include "wt-status.h"
#include "commit-reach.h"
#include "sequencer.h"
-#include "packfile.h"
/**
* Parses the value of --rebase. If value is a false value, returns
diff --git a/builtin/push.c b/builtin/push.c
index c95b69f7d7..2fbb31c3ad 100644
--- a/builtin/push.c
+++ b/builtin/push.c
@@ -7,7 +7,6 @@
#include "config.h"
#include "environment.h"
#include "gettext.h"
-#include "refs.h"
#include "refspec.h"
#include "run-command.h"
#include "remote.h"
diff --git a/builtin/range-diff.c b/builtin/range-diff.c
index e455a4795c..f02cbac087 100644
--- a/builtin/range-diff.c
+++ b/builtin/range-diff.c
@@ -5,7 +5,6 @@
#include "range-diff.h"
#include "config.h"
#include "repository.h"
-#include "revision.h"
static const char * const builtin_range_diff_usage[] = {
N_("git range-diff [<options>] <old-base>..<old-tip> <new-base>..<new-tip>"),
diff --git a/builtin/read-tree.c b/builtin/read-tree.c
index 8196ca9dd8..20e7db1973 100644
--- a/builtin/read-tree.c
+++ b/builtin/read-tree.c
@@ -16,14 +16,12 @@
#include "tree-walk.h"
#include "cache-tree.h"
#include "unpack-trees.h"
-#include "dir.h"
#include "parse-options.h"
#include "repository.h"
#include "resolve-undo.h"
#include "setup.h"
#include "sparse-index.h"
#include "submodule.h"
-#include "submodule-config.h"
static int nr_trees;
static int read_empty;
diff --git a/builtin/rebase.c b/builtin/rebase.c
index ddde4cbb87..995818c28d 100644
--- a/builtin/rebase.c
+++ b/builtin/rebase.c
@@ -11,14 +11,10 @@
#include "gettext.h"
#include "hex.h"
#include "run-command.h"
-#include "exec-cmd.h"
#include "strvec.h"
#include "dir.h"
-#include "packfile.h"
#include "refs.h"
-#include "quote.h"
#include "config.h"
-#include "cache-tree.h"
#include "unpack-trees.h"
#include "lockfile.h"
#include "object-file.h"
diff --git a/builtin/receive-pack.c b/builtin/receive-pack.c
index ccf9738bce..e36b1d619f 100644
--- a/builtin/receive-pack.c
+++ b/builtin/receive-pack.c
@@ -22,7 +22,6 @@
#include "connected.h"
#include "strvec.h"
#include "version.h"
-#include "tag.h"
#include "gpg-interface.h"
#include "sigchain.h"
#include "fsck.h"
diff --git a/builtin/repack.c b/builtin/repack.c
index c54777bbe5..ede36328a3 100644
--- a/builtin/repack.c
+++ b/builtin/repack.c
@@ -8,7 +8,6 @@
#include "path.h"
#include "run-command.h"
#include "server-info.h"
-#include "sigchain.h"
#include "strbuf.h"
#include "string-list.h"
#include "strvec.h"
diff --git a/builtin/rerere.c b/builtin/rerere.c
index 07a9d37275..b2efc6f640 100644
--- a/builtin/rerere.c
+++ b/builtin/rerere.c
@@ -1,6 +1,5 @@
#include "builtin.h"
#include "config.h"
-#include "dir.h"
#include "gettext.h"
#include "parse-options.h"
#include "repository.h"
diff --git a/builtin/reset.c b/builtin/reset.c
index 4b018d20e3..8390bfe4c4 100644
--- a/builtin/reset.c
+++ b/builtin/reset.c
@@ -16,10 +16,8 @@
#include "hash.h"
#include "hex.h"
#include "lockfile.h"
-#include "tag.h"
#include "object.h"
#include "pretty.h"
-#include "run-command.h"
#include "refs.h"
#include "diff.h"
#include "diffcore.h"
@@ -33,7 +31,6 @@
#include "setup.h"
#include "sparse-index.h"
#include "submodule.h"
-#include "submodule-config.h"
#include "trace.h"
#include "trace2.h"
#include "dir.h"
diff --git a/builtin/rev-list.c b/builtin/rev-list.c
index 181353dcf5..b3f4783858 100644
--- a/builtin/rev-list.c
+++ b/builtin/rev-list.c
@@ -7,13 +7,11 @@
#include "hex.h"
#include "revision.h"
#include "list-objects.h"
-#include "list-objects-filter.h"
#include "list-objects-filter-options.h"
#include "object.h"
#include "object-name.h"
#include "object-file.h"
#include "object-store-ll.h"
-#include "pack.h"
#include "pack-bitmap.h"
#include "log-tree.h"
#include "graph.h"
diff --git a/builtin/revert.c b/builtin/revert.c
index e6f9a1ad26..89821bab95 100644
--- a/builtin/revert.c
+++ b/builtin/revert.c
@@ -1,5 +1,4 @@
#include "git-compat-util.h"
-#include "config.h"
#include "builtin.h"
#include "parse-options.h"
#include "diff.h"
@@ -7,7 +6,6 @@
#include "repository.h"
#include "revision.h"
#include "rerere.h"
-#include "dir.h"
#include "sequencer.h"
#include "branch.h"
diff --git a/builtin/rm.c b/builtin/rm.c
index dff819ae50..fd130cea2d 100644
--- a/builtin/rm.c
+++ b/builtin/rm.c
@@ -9,7 +9,6 @@
#include "config.h"
#include "lockfile.h"
#include "dir.h"
-#include "cache-tree.h"
#include "gettext.h"
#include "hash.h"
#include "tree-walk.h"
diff --git a/builtin/send-pack.c b/builtin/send-pack.c
index e12054a78e..b7183be970 100644
--- a/builtin/send-pack.c
+++ b/builtin/send-pack.c
@@ -1,19 +1,14 @@
#include "builtin.h"
#include "config.h"
-#include "commit.h"
#include "hex.h"
-#include "refs.h"
#include "pkt-line.h"
-#include "sideband.h"
#include "run-command.h"
#include "remote.h"
#include "connect.h"
#include "send-pack.h"
#include "quote.h"
#include "transport.h"
-#include "version.h"
#include "oid-array.h"
-#include "gpg-interface.h"
#include "gettext.h"
#include "protocol.h"
#include "parse-options.h"
diff --git a/builtin/show-ref.c b/builtin/show-ref.c
index 59d2291cbf..aaa2c39b2f 100644
--- a/builtin/show-ref.c
+++ b/builtin/show-ref.c
@@ -6,7 +6,6 @@
#include "object-name.h"
#include "object-store-ll.h"
#include "object.h"
-#include "tag.h"
#include "string-list.h"
#include "parse-options.h"
diff --git a/builtin/sparse-checkout.c b/builtin/sparse-checkout.c
index 5c8ffb1f75..80227f3df1 100644
--- a/builtin/sparse-checkout.c
+++ b/builtin/sparse-checkout.c
@@ -8,14 +8,10 @@
#include "parse-options.h"
#include "pathspec.h"
#include "repository.h"
-#include "run-command.h"
#include "strbuf.h"
#include "string-list.h"
-#include "cache-tree.h"
#include "lockfile.h"
-#include "resolve-undo.h"
#include "unpack-trees.h"
-#include "wt-status.h"
#include "quote.h"
#include "setup.h"
#include "sparse-index.h"
diff --git a/builtin/stash.c b/builtin/stash.c
index 4a6771c9f4..b2813c614c 100644
--- a/builtin/stash.c
+++ b/builtin/stash.c
@@ -26,7 +26,6 @@
#include "sparse-index.h"
#include "log-tree.h"
#include "diffcore.h"
-#include "exec-cmd.h"
#include "reflog.h"
#include "add-interactive.h"
diff --git a/builtin/submodule--helper.c b/builtin/submodule--helper.c
index cce46450ab..fda50f2af1 100644
--- a/builtin/submodule--helper.c
+++ b/builtin/submodule--helper.c
@@ -22,7 +22,6 @@
#include "remote.h"
#include "refs.h"
#include "refspec.h"
-#include "connect.h"
#include "revision.h"
#include "diffcore.h"
#include "diff.h"
diff --git a/builtin/tag.c b/builtin/tag.c
index 2528d499dd..f036cf32f5 100644
--- a/builtin/tag.c
+++ b/builtin/tag.c
@@ -18,7 +18,6 @@
#include "object-store-ll.h"
#include "path.h"
#include "tag.h"
-#include "run-command.h"
#include "parse-options.h"
#include "diff.h"
#include "revision.h"
diff --git a/builtin/unpack-objects.c b/builtin/unpack-objects.c
index fef7423448..e0a701f2b3 100644
--- a/builtin/unpack-objects.c
+++ b/builtin/unpack-objects.c
@@ -10,12 +10,8 @@
#include "delta.h"
#include "pack.h"
#include "blob.h"
-#include "commit.h"
#include "replace-object.h"
#include "strbuf.h"
-#include "tag.h"
-#include "tree.h"
-#include "tree-walk.h"
#include "progress.h"
#include "decorate.h"
#include "fsck.h"
diff --git a/builtin/update-ref.c b/builtin/update-ref.c
index c0c4e65e6f..61338a01ec 100644
--- a/builtin/update-ref.c
+++ b/builtin/update-ref.c
@@ -7,7 +7,6 @@
#include "parse-options.h"
#include "quote.h"
#include "repository.h"
-#include "strvec.h"
static const char * const git_update_ref_usage[] = {
N_("git update-ref [<options>] -d <refname> [<old-val>]"),
diff --git a/builtin/verify-commit.c b/builtin/verify-commit.c
index 9680b58701..0d2b9aea2a 100644
--- a/builtin/verify-commit.c
+++ b/builtin/verify-commit.c
@@ -9,10 +9,8 @@
#include "config.h"
#include "gettext.h"
#include "object-name.h"
-#include "object-store-ll.h"
#include "repository.h"
#include "commit.h"
-#include "run-command.h"
#include "parse-options.h"
#include "gpg-interface.h"
diff --git a/builtin/verify-tag.c b/builtin/verify-tag.c
index d8753270eb..c731e2f87b 100644
--- a/builtin/verify-tag.c
+++ b/builtin/verify-tag.c
@@ -9,7 +9,6 @@
#include "config.h"
#include "gettext.h"
#include "tag.h"
-#include "run-command.h"
#include "object-name.h"
#include "parse-options.h"
#include "gpg-interface.h"
diff --git a/bulk-checkin.c b/bulk-checkin.c
index 6ce62999e5..eb46b88637 100644
--- a/bulk-checkin.c
+++ b/bulk-checkin.c
@@ -11,7 +11,6 @@
#include "csum-file.h"
#include "pack.h"
#include "strbuf.h"
-#include "string-list.h"
#include "tmp-objdir.h"
#include "packfile.h"
#include "object-file.h"
diff --git a/bundle-uri.c b/bundle-uri.c
index 8492fffd2f..ca32050a78 100644
--- a/bundle-uri.c
+++ b/bundle-uri.c
@@ -4,7 +4,6 @@
#include "copy.h"
#include "environment.h"
#include "gettext.h"
-#include "object-store-ll.h"
#include "refs.h"
#include "run-command.h"
#include "hashmap.h"
diff --git a/cache-tree.c b/cache-tree.c
index 641427ed41..64678fe199 100644
--- a/cache-tree.c
+++ b/cache-tree.c
@@ -11,7 +11,6 @@
#include "read-cache-ll.h"
#include "replace-object.h"
#include "promisor-remote.h"
-#include "sparse-index.h"
#include "trace.h"
#include "trace2.h"
diff --git a/combine-diff.c b/combine-diff.c
index f90f442482..db94581f72 100644
--- a/combine-diff.c
+++ b/combine-diff.c
@@ -2,7 +2,6 @@
#include "object-store-ll.h"
#include "commit.h"
#include "convert.h"
-#include "blob.h"
#include "diff.h"
#include "diffcore.h"
#include "environment.h"
diff --git a/commit-graph.c b/commit-graph.c
index 6fad9d195d..bba316913c 100644
--- a/commit-graph.c
+++ b/commit-graph.c
@@ -1,14 +1,13 @@
#include "git-compat-util.h"
#include "config.h"
+#include "csum-file.h"
#include "gettext.h"
#include "hex.h"
#include "lockfile.h"
-#include "pack.h"
#include "packfile.h"
#include "commit.h"
#include "object.h"
#include "refs.h"
-#include "revision.h"
#include "hash-lookup.h"
#include "commit-graph.h"
#include "object-file.h"
diff --git a/commit-reach.c b/commit-reach.c
index a868a575ea..ecc913fc99 100644
--- a/commit-reach.c
+++ b/commit-reach.c
@@ -4,7 +4,6 @@
#include "decorate.h"
#include "hex.h"
#include "prio-queue.h"
-#include "tree.h"
#include "ref-filter.h"
#include "revision.h"
#include "tag.h"
diff --git a/commit.c b/commit.c
index b7dc1854ad..ef679a0b93 100644
--- a/commit.c
+++ b/commit.c
@@ -8,7 +8,6 @@
#include "repository.h"
#include "object-name.h"
#include "object-store-ll.h"
-#include "pkt-line.h"
#include "utf8.h"
#include "diff.h"
#include "revision.h"
@@ -23,7 +22,6 @@
#include "advice.h"
#include "refs.h"
#include "commit-reach.h"
-#include "run-command.h"
#include "setup.h"
#include "shallow.h"
#include "tree.h"
diff --git a/compat/fsmonitor/fsm-health-win32.c b/compat/fsmonitor/fsm-health-win32.c
index 2d4e245beb..2aa8c219ac 100644
--- a/compat/fsmonitor/fsm-health-win32.c
+++ b/compat/fsmonitor/fsm-health-win32.c
@@ -4,6 +4,7 @@
#include "fsm-health.h"
#include "fsmonitor--daemon.h"
#include "gettext.h"
+#include "simple-ipc.h"
/*
* Every minute wake up and test our health.
diff --git a/compat/fsmonitor/fsm-listen-darwin.c b/compat/fsmonitor/fsm-listen-darwin.c
index 11b56d3ef1..2fc67442eb 100644
--- a/compat/fsmonitor/fsm-listen-darwin.c
+++ b/compat/fsmonitor/fsm-listen-darwin.c
@@ -29,6 +29,7 @@
#include "fsmonitor--daemon.h"
#include "fsmonitor-path-utils.h"
#include "gettext.h"
+#include "simple-ipc.h"
#include "string-list.h"
#include "trace.h"
diff --git a/compat/fsmonitor/fsm-listen-win32.c b/compat/fsmonitor/fsm-listen-win32.c
index 90a2412284..5a21dade7b 100644
--- a/compat/fsmonitor/fsm-listen-win32.c
+++ b/compat/fsmonitor/fsm-listen-win32.c
@@ -4,6 +4,7 @@
#include "fsm-listen.h"
#include "fsmonitor--daemon.h"
#include "gettext.h"
+#include "simple-ipc.h"
#include "trace2.h"
/*
diff --git a/compat/simple-ipc/ipc-shared.c b/compat/simple-ipc/ipc-shared.c
index e5e1dda8cc..cb176d966f 100644
--- a/compat/simple-ipc/ipc-shared.c
+++ b/compat/simple-ipc/ipc-shared.c
@@ -1,8 +1,5 @@
#include "git-compat-util.h"
#include "simple-ipc.h"
-#include "strbuf.h"
-#include "pkt-line.h"
-#include "thread-utils.h"
#ifndef SUPPORTS_SIMPLE_IPC
/*
diff --git a/compat/simple-ipc/ipc-unix-socket.c b/compat/simple-ipc/ipc-unix-socket.c
index b2f4f22ce4..9b3f2cdf8c 100644
--- a/compat/simple-ipc/ipc-unix-socket.c
+++ b/compat/simple-ipc/ipc-unix-socket.c
@@ -2,7 +2,6 @@
#include "gettext.h"
#include "simple-ipc.h"
#include "strbuf.h"
-#include "pkt-line.h"
#include "thread-utils.h"
#include "trace2.h"
#include "unix-socket.h"
diff --git a/config.c b/config.c
index 00a11b5d98..9ff6ae1cb9 100644
--- a/config.c
+++ b/config.c
@@ -30,15 +30,12 @@
#include "pager.h"
#include "path.h"
#include "utf8.h"
-#include "dir.h"
#include "color.h"
-#include "replace-object.h"
#include "refs.h"
#include "setup.h"
#include "strvec.h"
#include "trace2.h"
#include "wildmatch.h"
-#include "worktree.h"
#include "ws.h"
#include "write-or-die.h"
diff --git a/delta-islands.c b/delta-islands.c
index 5de5759f3f..ee2318d45a 100644
--- a/delta-islands.c
+++ b/delta-islands.c
@@ -1,18 +1,13 @@
#include "git-compat-util.h"
-#include "attr.h"
#include "object.h"
-#include "blob.h"
#include "commit.h"
#include "gettext.h"
#include "hex.h"
#include "tag.h"
#include "tree.h"
-#include "delta.h"
#include "pack.h"
#include "tree-walk.h"
#include "diff.h"
-#include "revision.h"
-#include "list-objects.h"
#include "progress.h"
#include "refs.h"
#include "khash.h"
diff --git a/diff-lib.c b/diff-lib.c
index 92aa13789d..6c8df04273 100644
--- a/diff-lib.c
+++ b/diff-lib.c
@@ -2,7 +2,6 @@
* Copyright (C) 2005 Junio C Hamano
*/
#include "git-compat-util.h"
-#include "quote.h"
#include "commit.h"
#include "diff.h"
#include "diffcore.h"
diff --git a/diff-no-index.c b/diff-no-index.c
index e7041b89e3..3a8965672c 100644
--- a/diff-no-index.c
+++ b/diff-no-index.c
@@ -8,13 +8,10 @@
#include "abspath.h"
#include "color.h"
#include "commit.h"
-#include "blob.h"
-#include "tag.h"
#include "diff.h"
#include "diffcore.h"
#include "gettext.h"
#include "revision.h"
-#include "log-tree.h"
#include "parse-options.h"
#include "string-list.h"
#include "dir.h"
diff --git a/diff.c b/diff.c
index a2def45644..a89a6a6128 100644
--- a/diff.c
+++ b/diff.c
@@ -16,12 +16,10 @@
#include "hex.h"
#include "xdiff-interface.h"
#include "color.h"
-#include "attr.h"
#include "run-command.h"
#include "utf8.h"
#include "object-store-ll.h"
#include "userdiff.h"
-#include "submodule-config.h"
#include "submodule.h"
#include "hashmap.h"
#include "mem-pool.h"
diff --git a/diffcore-break.c b/diffcore-break.c
index f57ece2757..49ba38aa7c 100644
--- a/diffcore-break.c
+++ b/diffcore-break.c
@@ -2,7 +2,6 @@
* Copyright (C) 2005 Junio C Hamano
*/
#include "git-compat-util.h"
-#include "diff.h"
#include "diffcore.h"
#include "hash.h"
#include "object.h"
diff --git a/diffcore-delta.c b/diffcore-delta.c
index c30b56e983..4927ab8fb0 100644
--- a/diffcore-delta.c
+++ b/diffcore-delta.c
@@ -1,5 +1,4 @@
#include "git-compat-util.h"
-#include "diff.h"
#include "diffcore.h"
/*
diff --git a/dir.c b/dir.c
index 4d1cd039be..ac69954230 100644
--- a/dir.c
+++ b/dir.c
@@ -16,7 +16,6 @@
#include "object-file.h"
#include "object-store-ll.h"
#include "path.h"
-#include "attr.h"
#include "refs.h"
#include "wildmatch.h"
#include "pathspec.h"
diff --git a/entry.c b/entry.c
index 076e97eb89..f918a3a78e 100644
--- a/entry.c
+++ b/entry.c
@@ -1,5 +1,4 @@
#include "git-compat-util.h"
-#include "blob.h"
#include "object-store-ll.h"
#include "dir.h"
#include "environment.h"
diff --git a/exec-cmd.c b/exec-cmd.c
index 1d597e84ea..909777f61f 100644
--- a/exec-cmd.c
+++ b/exec-cmd.c
@@ -4,7 +4,6 @@
#include "exec-cmd.h"
#include "gettext.h"
#include "path.h"
-#include "quote.h"
#include "run-command.h"
#include "strvec.h"
#include "trace.h"
diff --git a/fetch-pack.c b/fetch-pack.c
index 31a72d43de..5b8aa0adc7 100644
--- a/fetch-pack.c
+++ b/fetch-pack.c
@@ -10,7 +10,6 @@
#include "pkt-line.h"
#include "commit.h"
#include "tag.h"
-#include "exec-cmd.h"
#include "pack.h"
#include "sideband.h"
#include "fetch-pack.h"
@@ -18,7 +17,6 @@
#include "run-command.h"
#include "connect.h"
#include "trace2.h"
-#include "transport.h"
#include "version.h"
#include "oid-array.h"
#include "oidset.h"
diff --git a/fetch-pack.h b/fetch-pack.h
index 8c7752fc82..6775d26517 100644
--- a/fetch-pack.h
+++ b/fetch-pack.h
@@ -2,7 +2,6 @@
#define FETCH_PACK_H
#include "string-list.h"
-#include "run-command.h"
#include "protocol.h"
#include "list-objects-filter-options.h"
#include "oidset.h"
diff --git a/fsck.c b/fsck.c
index b624083a13..1ad02fcdfa 100644
--- a/fsck.c
+++ b/fsck.c
@@ -16,7 +16,6 @@
#include "refs.h"
#include "url.h"
#include "utf8.h"
-#include "decorate.h"
#include "oidset.h"
#include "packfile.h"
#include "submodule-config.h"
diff --git a/fsmonitor--daemon.h b/fsmonitor--daemon.h
index 673f80d2aa..5cbbec8d94 100644
--- a/fsmonitor--daemon.h
+++ b/fsmonitor--daemon.h
@@ -3,9 +3,7 @@
#ifdef HAVE_FSMONITOR_DAEMON_BACKEND
-#include "dir.h"
-#include "run-command.h"
-#include "simple-ipc.h"
+#include "hashmap.h"
#include "thread-utils.h"
#include "fsmonitor-path-utils.h"
diff --git a/fsmonitor-ipc.c b/fsmonitor-ipc.c
index 153918cf76..45471b5b74 100644
--- a/fsmonitor-ipc.c
+++ b/fsmonitor-ipc.c
@@ -1,5 +1,4 @@
#include "git-compat-util.h"
-#include "fsmonitor-ll.h"
#include "gettext.h"
#include "simple-ipc.h"
#include "fsmonitor-ipc.h"
diff --git a/gettext.c b/gettext.c
index f27e94407b..57facbc21e 100644
--- a/gettext.c
+++ b/gettext.c
@@ -7,9 +7,7 @@
#include "environment.h"
#include "exec-cmd.h"
#include "gettext.h"
-#include "strbuf.h"
#include "utf8.h"
-#include "config.h"
#ifndef NO_GETTEXT
# include <libintl.h>
diff --git a/gpg-interface.c b/gpg-interface.c
index 25c42cb9fd..f614105033 100644
--- a/gpg-interface.c
+++ b/gpg-interface.c
@@ -12,7 +12,6 @@
#include "sigchain.h"
#include "tempfile.h"
#include "alias.h"
-#include "environment.h"
static int git_gpg_config(const char *, const char *,
const struct config_context *, void *);
diff --git a/grep.c b/grep.c
index fc2d0c837a..5f23d1a50c 100644
--- a/grep.c
+++ b/grep.c
@@ -9,7 +9,6 @@
#include "xdiff-interface.h"
#include "diff.h"
#include "diffcore.h"
-#include "commit.h"
#include "quote.h"
#include "help.h"
diff --git a/http-fetch.c b/http-fetch.c
index fffda59267..bec94988bb 100644
--- a/http-fetch.c
+++ b/http-fetch.c
@@ -1,12 +1,12 @@
#include "git-compat-util.h"
#include "config.h"
-#include "exec-cmd.h"
#include "gettext.h"
#include "hex.h"
#include "http.h"
#include "walker.h"
#include "setup.h"
#include "strvec.h"
+#include "url.h"
#include "urlmatch.h"
#include "trace2.h"
diff --git a/http-push.c b/http-push.c
index a704f490fd..b4d0b2a6aa 100644
--- a/http-push.c
+++ b/http-push.c
@@ -6,10 +6,8 @@
#include "tag.h"
#include "blob.h"
#include "http.h"
-#include "refs.h"
#include "diff.h"
#include "revision.h"
-#include "exec-cmd.h"
#include "remote.h"
#include "list-objects.h"
#include "setup.h"
@@ -17,6 +15,7 @@
#include "strvec.h"
#include "tree.h"
#include "tree-walk.h"
+#include "url.h"
#include "packfile.h"
#include "object-store-ll.h"
#include "commit-reach.h"
diff --git a/http-walker.c b/http-walker.c
index 78d99f7c4b..b395ef1327 100644
--- a/http-walker.c
+++ b/http-walker.c
@@ -1,6 +1,5 @@
#include "git-compat-util.h"
#include "repository.h"
-#include "commit.h"
#include "hex.h"
#include "walker.h"
#include "http.h"
diff --git a/http.c b/http.c
index 8e5c4c91ea..e73b136e58 100644
--- a/http.c
+++ b/http.c
@@ -4,7 +4,6 @@
#include "http.h"
#include "config.h"
#include "pack.h"
-#include "sideband.h"
#include "run-command.h"
#include "url.h"
#include "urlmatch.h"
@@ -15,7 +14,6 @@
#include "trace.h"
#include "transport.h"
#include "packfile.h"
-#include "protocol.h"
#include "string-list.h"
#include "object-file.h"
#include "object-store-ll.h"
diff --git a/http.h b/http.h
index 3a409bccd4..3af19a8bf5 100644
--- a/http.h
+++ b/http.h
@@ -10,7 +10,6 @@ struct packed_git;
#include "strbuf.h"
#include "remote.h"
-#include "url.h"
#define DEFAULT_MAX_REQUESTS 5
diff --git a/imap-send.c b/imap-send.c
index 65252950d5..d662811ee8 100644
--- a/imap-send.c
+++ b/imap-send.c
@@ -24,12 +24,10 @@
#include "git-compat-util.h"
#include "config.h"
#include "credential.h"
-#include "exec-cmd.h"
#include "gettext.h"
#include "run-command.h"
#include "parse-options.h"
#include "setup.h"
-#include "strbuf.h"
#if defined(NO_OPENSSL) && !defined(HAVE_OPENSSL_CSPRNG)
typedef void *SSL;
#endif
diff --git a/line-log.c b/line-log.c
index 24a1ecb677..8ff6ccb772 100644
--- a/line-log.c
+++ b/line-log.c
@@ -1,8 +1,8 @@
#include "git-compat-util.h"
+#include "diffcore.h"
#include "line-range.h"
#include "hex.h"
#include "tag.h"
-#include "blob.h"
#include "tree.h"
#include "diff.h"
#include "commit.h"
@@ -12,8 +12,6 @@
#include "xdiff-interface.h"
#include "strbuf.h"
#include "log-tree.h"
-#include "graph.h"
-#include "userdiff.h"
#include "line-log.h"
#include "setup.h"
#include "strvec.h"
diff --git a/line-log.h b/line-log.h
index 4291da8d79..e9dadbc1a5 100644
--- a/line-log.h
+++ b/line-log.h
@@ -1,8 +1,6 @@
#ifndef LINE_LOG_H
#define LINE_LOG_H
-#include "diffcore.h"
-
struct rev_info;
struct commit;
struct string_list;
diff --git a/line-range.c b/line-range.c
index 47bf0d6f1a..60f0e5ada8 100644
--- a/line-range.c
+++ b/line-range.c
@@ -1,7 +1,6 @@
#include "git-compat-util.h"
#include "line-range.h"
#include "xdiff-interface.h"
-#include "strbuf.h"
#include "userdiff.h"
/*
diff --git a/list-objects-filter-options.c b/list-objects-filter-options.c
index 8a08b7af49..c5f363ca6f 100644
--- a/list-objects-filter-options.c
+++ b/list-objects-filter-options.c
@@ -1,11 +1,6 @@
#include "git-compat-util.h"
-#include "commit.h"
#include "config.h"
#include "gettext.h"
-#include "revision.h"
-#include "strvec.h"
-#include "list-objects.h"
-#include "list-objects-filter.h"
#include "list-objects-filter-options.h"
#include "promisor-remote.h"
#include "trace.h"
diff --git a/list-objects-filter.c b/list-objects-filter.c
index 9327ccd505..da287cc8e0 100644
--- a/list-objects-filter.c
+++ b/list-objects-filter.c
@@ -2,14 +2,9 @@
#include "dir.h"
#include "gettext.h"
#include "hex.h"
-#include "tag.h"
#include "commit.h"
-#include "tree.h"
-#include "blob.h"
#include "diff.h"
-#include "tree-walk.h"
#include "revision.h"
-#include "list-objects.h"
#include "list-objects-filter.h"
#include "list-objects-filter-options.h"
#include "oidmap.h"
diff --git a/log-tree.c b/log-tree.c
index 504da6b519..337b9334cd 100644
--- a/log-tree.c
+++ b/log-tree.c
@@ -2,6 +2,7 @@
#include "commit-reach.h"
#include "config.h"
#include "diff.h"
+#include "diffcore.h"
#include "environment.h"
#include "hex.h"
#include "object-name.h"
diff --git a/ls-refs.c b/ls-refs.c
index 0e49b932c3..819cbefee3 100644
--- a/ls-refs.c
+++ b/ls-refs.c
@@ -5,7 +5,6 @@
#include "hex.h"
#include "repository.h"
#include "refs.h"
-#include "remote.h"
#include "strvec.h"
#include "ls-refs.h"
#include "pkt-line.h"
diff --git a/merge-blobs.c b/merge-blobs.c
index 9293cbf75c..2f659fd014 100644
--- a/merge-blobs.c
+++ b/merge-blobs.c
@@ -1,6 +1,4 @@
#include "git-compat-util.h"
-#include "run-command.h"
-#include "xdiff-interface.h"
#include "merge-ll.h"
#include "blob.h"
#include "merge-blobs.h"
diff --git a/merge-ort.c b/merge-ort.c
index 6491070d96..77ba7f3020 100644
--- a/merge-ort.c
+++ b/merge-ort.c
@@ -19,7 +19,6 @@
#include "alloc.h"
#include "attr.h"
-#include "blob.h"
#include "cache-tree.h"
#include "commit.h"
#include "commit-reach.h"
@@ -42,8 +41,6 @@
#include "revision.h"
#include "sparse-index.h"
#include "strmap.h"
-#include "submodule-config.h"
-#include "submodule.h"
#include "trace2.h"
#include "tree.h"
#include "unpack-trees.h"
diff --git a/merge-recursive.c b/merge-recursive.c
index e3beb0801b..a0c3e7a2d9 100644
--- a/merge-recursive.c
+++ b/merge-recursive.c
@@ -6,10 +6,7 @@
#include "git-compat-util.h"
#include "merge-recursive.h"
-#include "advice.h"
#include "alloc.h"
-#include "attr.h"
-#include "blob.h"
#include "cache-tree.h"
#include "commit.h"
#include "commit-reach.h"
@@ -32,8 +29,6 @@
#include "revision.h"
#include "sparse-index.h"
#include "string-list.h"
-#include "submodule-config.h"
-#include "submodule.h"
#include "symlinks.h"
#include "tag.h"
#include "tree-walk.h"
diff --git a/merge.c b/merge.c
index b60925459c..ca89b312d1 100644
--- a/merge.c
+++ b/merge.c
@@ -1,6 +1,4 @@
#include "git-compat-util.h"
-#include "diff.h"
-#include "diffcore.h"
#include "gettext.h"
#include "hash.h"
#include "hex.h"
@@ -13,7 +11,6 @@
#include "tree.h"
#include "tree-walk.h"
#include "unpack-trees.h"
-#include "dir.h"
static const char *merge_argument(struct commit *commit)
{
diff --git a/midx.h b/midx.h
index a5d98919c8..eb57a37519 100644
--- a/midx.h
+++ b/midx.h
@@ -1,7 +1,6 @@
#ifndef MIDX_H
#define MIDX_H
-#include "repository.h"
#include "string-list.h"
struct object_id;
diff --git a/negotiator/noop.c b/negotiator/noop.c
index de39028ab7..65e3c20008 100644
--- a/negotiator/noop.c
+++ b/negotiator/noop.c
@@ -1,6 +1,5 @@
#include "git-compat-util.h"
#include "noop.h"
-#include "../commit.h"
#include "../fetch-negotiator.h"
static void known_common(struct fetch_negotiator *n UNUSED,
diff --git a/notes-utils.c b/notes-utils.c
index 01f4f5b424..6197a5a455 100644
--- a/notes-utils.c
+++ b/notes-utils.c
@@ -5,7 +5,6 @@
#include "gettext.h"
#include "refs.h"
#include "notes-utils.h"
-#include "repository.h"
#include "strbuf.h"
void create_notes_commit(struct repository *r,
diff --git a/notes.c b/notes.c
index 1ef2a331ce..fed1eda80c 100644
--- a/notes.c
+++ b/notes.c
@@ -5,8 +5,6 @@
#include "notes.h"
#include "object-name.h"
#include "object-store-ll.h"
-#include "blob.h"
-#include "tree.h"
#include "utf8.h"
#include "strbuf.h"
#include "tree-walk.h"
diff --git a/object-file.c b/object-file.c
index 7c7afe5793..619f039ebc 100644
--- a/object-file.c
+++ b/object-file.c
@@ -15,24 +15,16 @@
#include "hex.h"
#include "string-list.h"
#include "lockfile.h"
-#include "delta.h"
#include "pack.h"
-#include "blob.h"
#include "commit.h"
#include "run-command.h"
-#include "tag.h"
-#include "tree.h"
-#include "tree-walk.h"
#include "refs.h"
-#include "pack-revindex.h"
-#include "hash-lookup.h"
#include "bulk-checkin.h"
#include "repository.h"
#include "replace-object.h"
#include "streaming.h"
#include "dir.h"
#include "list.h"
-#include "mergesort.h"
#include "quote.h"
#include "packfile.h"
#include "object-file.h"
diff --git a/object-name.c b/object-name.c
index 0bfa29dbbf..3a2ef5d680 100644
--- a/object-name.c
+++ b/object-name.c
@@ -8,7 +8,6 @@
#include "tag.h"
#include "commit.h"
#include "tree.h"
-#include "blob.h"
#include "tree-walk.h"
#include "refs.h"
#include "remote.h"
@@ -21,7 +20,6 @@
#include "read-cache-ll.h"
#include "repository.h"
#include "setup.h"
-#include "submodule.h"
#include "midx.h"
#include "commit-reach.h"
#include "date.h"
diff --git a/pack-bitmap-write.c b/pack-bitmap-write.c
index f4ecdf8b0e..be4733e3bd 100644
--- a/pack-bitmap-write.c
+++ b/pack-bitmap-write.c
@@ -4,12 +4,9 @@
#include "hex.h"
#include "object-store-ll.h"
#include "commit.h"
-#include "tag.h"
#include "diff.h"
#include "revision.h"
-#include "list-objects.h"
#include "progress.h"
-#include "pack-revindex.h"
#include "pack.h"
#include "pack-bitmap.h"
#include "hash-lookup.h"
diff --git a/pack-check.c b/pack-check.c
index 977f619618..25104d5b14 100644
--- a/pack-check.c
+++ b/pack-check.c
@@ -3,7 +3,6 @@
#include "hex.h"
#include "repository.h"
#include "pack.h"
-#include "pack-revindex.h"
#include "progress.h"
#include "packfile.h"
#include "object-file.h"
diff --git a/pack-write.c b/pack-write.c
index b19ddf15b2..80ecfa544c 100644
--- a/pack-write.c
+++ b/pack-write.c
@@ -7,7 +7,6 @@
#include "remote.h"
#include "chunk-format.h"
#include "pack-mtimes.h"
-#include "oidmap.h"
#include "pack-objects.h"
#include "pack-revindex.h"
#include "path.h"
diff --git a/packfile.c b/packfile.c
index 9cc0a2e37a..84a005674d 100644
--- a/packfile.c
+++ b/packfile.c
@@ -9,7 +9,6 @@
#include "mergesort.h"
#include "packfile.h"
#include "delta.h"
-#include "streaming.h"
#include "hash-lookup.h"
#include "commit.h"
#include "object.h"
diff --git a/parse-options.c b/parse-options.c
index 65fab5bb9d..4ce2b7ca16 100644
--- a/parse-options.c
+++ b/parse-options.c
@@ -2,8 +2,6 @@
#include "parse-options.h"
#include "abspath.h"
#include "parse.h"
-#include "commit.h"
-#include "color.h"
#include "gettext.h"
#include "strbuf.h"
#include "string-list.h"
diff --git a/patch-ids.c b/patch-ids.c
index c3e1a0dd21..a5683b462c 100644
--- a/patch-ids.c
+++ b/patch-ids.c
@@ -2,7 +2,6 @@
#include "diff.h"
#include "commit.h"
#include "hash.h"
-#include "hash-lookup.h"
#include "hex.h"
#include "patch-ids.h"
diff --git a/pkt-line.c b/pkt-line.c
index af83a19f4d..236dd3a3ee 100644
--- a/pkt-line.c
+++ b/pkt-line.c
@@ -4,6 +4,7 @@
#include "gettext.h"
#include "hex.h"
#include "run-command.h"
+#include "sideband.h"
#include "trace.h"
#include "write-or-die.h"
diff --git a/pkt-line.h b/pkt-line.h
index 954eec8719..aedef56286 100644
--- a/pkt-line.h
+++ b/pkt-line.h
@@ -2,7 +2,6 @@
#define PKTLINE_H
#include "strbuf.h"
-#include "sideband.h"
/*
* Write a packetized stream, where each line is preceded by
diff --git a/protocol-caps.c b/protocol-caps.c
index 808a68c974..75f4cbb0a7 100644
--- a/protocol-caps.c
+++ b/protocol-caps.c
@@ -3,7 +3,6 @@
#include "gettext.h"
#include "hex.h"
#include "pkt-line.h"
-#include "strvec.h"
#include "hash-ll.h"
#include "hex.h"
#include "object.h"
diff --git a/reachable.c b/reachable.c
index 0ce8f83e56..f29b06a5d0 100644
--- a/reachable.c
+++ b/reachable.c
@@ -2,7 +2,6 @@
#include "gettext.h"
#include "hex.h"
#include "refs.h"
-#include "tag.h"
#include "commit.h"
#include "blob.h"
#include "diff.h"
diff --git a/read-cache.c b/read-cache.c
index eb750e2e49..f546cf7875 100644
--- a/read-cache.c
+++ b/read-cache.c
@@ -20,7 +20,6 @@
#include "oid-array.h"
#include "tree.h"
#include "commit.h"
-#include "blob.h"
#include "environment.h"
#include "gettext.h"
#include "mem-pool.h"
@@ -31,7 +30,6 @@
#include "read-cache.h"
#include "resolve-undo.h"
#include "revision.h"
-#include "run-command.h"
#include "strbuf.h"
#include "trace2.h"
#include "varint.h"
diff --git a/ref-filter.c b/ref-filter.c
index 02397612ae..35b989e1df 100644
--- a/ref-filter.c
+++ b/ref-filter.c
@@ -22,16 +22,13 @@
#include "ref-filter.h"
#include "revision.h"
#include "utf8.h"
-#include "version.h"
#include "versioncmp.h"
#include "trailer.h"
#include "wt-status.h"
#include "commit-slab.h"
-#include "commit-graph.h"
#include "commit-reach.h"
#include "worktree.h"
#include "hashmap.h"
-#include "strvec.h"
static struct ref_msg {
const char *gone;
diff --git a/ref-filter.h b/ref-filter.h
index 0ce5af58ab..07cd6f6da3 100644
--- a/ref-filter.h
+++ b/ref-filter.h
@@ -3,7 +3,6 @@
#include "gettext.h"
#include "oid-array.h"
-#include "refs.h"
#include "commit.h"
#include "string-list.h"
#include "strvec.h"
diff --git a/reflog.c b/reflog.c
index 9ad50e7d93..0a1bc35e8c 100644
--- a/reflog.c
+++ b/reflog.c
@@ -6,7 +6,6 @@
#include "revision.h"
#include "tree.h"
#include "tree-walk.h"
-#include "worktree.h"
/* Remember to update object flag allocation in object.h */
#define INCOMPLETE (1u<<10)
diff --git a/refs/files-backend.c b/refs/files-backend.c
index ad8b1d143f..6734f2a309 100644
--- a/refs/files-backend.c
+++ b/refs/files-backend.c
@@ -1,5 +1,4 @@
#include "../git-compat-util.h"
-#include "../config.h"
#include "../copy.h"
#include "../environment.h"
#include "../gettext.h"
@@ -19,7 +18,6 @@
#include "../dir.h"
#include "../chdir-notify.h"
#include "../setup.h"
-#include "../worktree.h"
#include "../wrapper.h"
#include "../write-or-die.h"
#include "../revision.h"
diff --git a/refs/packed-backend.c b/refs/packed-backend.c
index b9fa097a29..e46906e612 100644
--- a/refs/packed-backend.c
+++ b/refs/packed-backend.c
@@ -1,5 +1,4 @@
#include "../git-compat-util.h"
-#include "../alloc.h"
#include "../config.h"
#include "../gettext.h"
#include "../hash.h"
diff --git a/refs/ref-cache.c b/refs/ref-cache.c
index 6e3b725245..a372a00941 100644
--- a/refs/ref-cache.c
+++ b/refs/ref-cache.c
@@ -1,5 +1,4 @@
#include "../git-compat-util.h"
-#include "../alloc.h"
#include "../hash.h"
#include "../refs.h"
#include "../repository.h"
diff --git a/reftable/dump.c b/reftable/dump.c
index ce936b4e18..26e0393c7d 100644
--- a/reftable/dump.c
+++ b/reftable/dump.c
@@ -11,14 +11,12 @@ https://developers.google.com/open-source/licenses/bsd
#include "reftable-blocksource.h"
#include "reftable-error.h"
-#include "reftable-merged.h"
#include "reftable-record.h"
#include "reftable-tests.h"
#include "reftable-writer.h"
#include "reftable-iterator.h"
#include "reftable-reader.h"
#include "reftable-stack.h"
-#include "reftable-generic.h"
#include <stddef.h>
#include <stdio.h>
diff --git a/reftable/generic.c b/reftable/generic.c
index 57f8032db9..b9f1c7c18a 100644
--- a/reftable/generic.c
+++ b/reftable/generic.c
@@ -6,7 +6,6 @@ license that can be found in the LICENSE file or at
https://developers.google.com/open-source/licenses/bsd
*/
-#include "basics.h"
#include "constants.h"
#include "record.h"
#include "generic.h"
diff --git a/reftable/merged.c b/reftable/merged.c
index 556bb5c556..574394092d 100644
--- a/reftable/merged.c
+++ b/reftable/merged.c
@@ -11,7 +11,6 @@ https://developers.google.com/open-source/licenses/bsd
#include "constants.h"
#include "iter.h"
#include "pq.h"
-#include "reader.h"
#include "record.h"
#include "generic.h"
#include "reftable-merged.h"
diff --git a/reftable/merged_test.c b/reftable/merged_test.c
index d08c16abef..0d6e0d4bf5 100644
--- a/reftable/merged_test.c
+++ b/reftable/merged_test.c
@@ -12,7 +12,6 @@ https://developers.google.com/open-source/licenses/bsd
#include "basics.h"
#include "blocksource.h"
-#include "constants.h"
#include "reader.h"
#include "record.h"
#include "test_framework.h"
diff --git a/reftable/reader.c b/reftable/reader.c
index 9de64f50b4..64dc366fb1 100644
--- a/reftable/reader.c
+++ b/reftable/reader.c
@@ -16,7 +16,6 @@ https://developers.google.com/open-source/licenses/bsd
#include "record.h"
#include "reftable-error.h"
#include "reftable-generic.h"
-#include "tree.h"
uint64_t block_source_size(struct reftable_block_source *source)
{
diff --git a/reftable/readwrite_test.c b/reftable/readwrite_test.c
index 278663f22d..79cd4e4c28 100644
--- a/reftable/readwrite_test.c
+++ b/reftable/readwrite_test.c
@@ -11,7 +11,6 @@ https://developers.google.com/open-source/licenses/bsd
#include "basics.h"
#include "block.h"
#include "blocksource.h"
-#include "constants.h"
#include "reader.h"
#include "record.h"
#include "test_framework.h"
diff --git a/reftable/refname_test.c b/reftable/refname_test.c
index 8645cd93bb..699e1aea41 100644
--- a/reftable/refname_test.c
+++ b/reftable/refname_test.c
@@ -9,7 +9,6 @@ https://developers.google.com/open-source/licenses/bsd
#include "basics.h"
#include "block.h"
#include "blocksource.h"
-#include "constants.h"
#include "reader.h"
#include "record.h"
#include "refname.h"
diff --git a/reftable/stack_test.c b/reftable/stack_test.c
index 14a3fc11ee..82280c2fd5 100644
--- a/reftable/stack_test.c
+++ b/reftable/stack_test.c
@@ -13,7 +13,6 @@ https://developers.google.com/open-source/licenses/bsd
#include "reftable-reader.h"
#include "merged.h"
#include "basics.h"
-#include "constants.h"
#include "record.h"
#include "test_framework.h"
#include "reftable-tests.h"
diff --git a/reftable/test_framework.c b/reftable/test_framework.c
index 84ac972cad..04044fc1a0 100644
--- a/reftable/test_framework.c
+++ b/reftable/test_framework.c
@@ -9,7 +9,6 @@ https://developers.google.com/open-source/licenses/bsd
#include "system.h"
#include "test_framework.h"
-#include "basics.h"
void set_test_hash(uint8_t *p, int i)
{
diff --git a/reftable/tree_test.c b/reftable/tree_test.c
index ac3a045ad4..6961a657ad 100644
--- a/reftable/tree_test.c
+++ b/reftable/tree_test.c
@@ -9,8 +9,6 @@ https://developers.google.com/open-source/licenses/bsd
#include "system.h"
#include "tree.h"
-#include "basics.h"
-#include "record.h"
#include "test_framework.h"
#include "reftable-tests.h"
diff --git a/remote-curl.c b/remote-curl.c
index fc29757b65..cb0182b582 100644
--- a/remote-curl.c
+++ b/remote-curl.c
@@ -8,11 +8,9 @@
#include "strbuf.h"
#include "walker.h"
#include "http.h"
-#include "exec-cmd.h"
#include "run-command.h"
#include "pkt-line.h"
#include "string-list.h"
-#include "sideband.h"
#include "strvec.h"
#include "credential.h"
#include "oid-array.h"
@@ -22,6 +20,7 @@
#include "quote.h"
#include "trace2.h"
#include "transport.h"
+#include "url.h"
#include "write-or-die.h"
static struct remote *remote;
diff --git a/remote.c b/remote.c
index 051d0a64a0..e07b316eac 100644
--- a/remote.c
+++ b/remote.c
@@ -15,7 +15,6 @@
#include "diff.h"
#include "revision.h"
#include "dir.h"
-#include "tag.h"
#include "setup.h"
#include "string-list.h"
#include "strvec.h"
diff --git a/repo-settings.c b/repo-settings.c
index 525f69c0c7..30cd478762 100644
--- a/repo-settings.c
+++ b/repo-settings.c
@@ -2,7 +2,6 @@
#include "config.h"
#include "repository.h"
#include "midx.h"
-#include "compat/fsmonitor/fsm-listen.h"
static void repo_cfg_bool(struct repository *r, const char *key, int *dest,
int def)
diff --git a/rerere.c b/rerere.c
index 09e1941285..ca7e77ba68 100644
--- a/rerere.c
+++ b/rerere.c
@@ -12,12 +12,10 @@
#include "dir.h"
#include "resolve-undo.h"
#include "merge-ll.h"
-#include "attr.h"
#include "path.h"
#include "pathspec.h"
#include "object-file.h"
#include "object-store-ll.h"
-#include "hash-lookup.h"
#include "strmap.h"
#define RESOLVED 0
diff --git a/reset.c b/reset.c
index 48da0adf85..0f2ff0fe31 100644
--- a/reset.c
+++ b/reset.c
@@ -6,7 +6,6 @@
#include "object-name.h"
#include "refs.h"
#include "reset.h"
-#include "run-command.h"
#include "tree-walk.h"
#include "tree.h"
#include "unpack-trees.h"
diff --git a/revision.c b/revision.c
index 56b8a6acfa..2424c9bd67 100644
--- a/revision.c
+++ b/revision.c
@@ -21,12 +21,10 @@
#include "reflog-walk.h"
#include "patch-ids.h"
#include "decorate.h"
-#include "log-tree.h"
#include "string-list.h"
#include "line-log.h"
#include "mailmap.h"
#include "commit-slab.h"
-#include "dir.h"
#include "cache-tree.h"
#include "bisect.h"
#include "packfile.h"
diff --git a/run-command.c b/run-command.c
index a558042c87..0e7435718a 100644
--- a/run-command.c
+++ b/run-command.c
@@ -14,9 +14,7 @@
#include "quote.h"
#include "config.h"
#include "packfile.h"
-#include "hook.h"
#include "compat/nonblock.h"
-#include "alloc.h"
void child_process_init(struct child_process *child)
{
diff --git a/send-pack.c b/send-pack.c
index 89aca9d829..37f59d4f66 100644
--- a/send-pack.c
+++ b/send-pack.c
@@ -4,7 +4,6 @@
#include "date.h"
#include "gettext.h"
#include "hex.h"
-#include "refs.h"
#include "object-store-ll.h"
#include "pkt-line.h"
#include "sideband.h"
@@ -12,7 +11,6 @@
#include "remote.h"
#include "connect.h"
#include "send-pack.h"
-#include "quote.h"
#include "transport.h"
#include "version.h"
#include "oid-array.h"
diff --git a/sequencer.c b/sequencer.c
index 455fc0a39f..3cc88d8a80 100644
--- a/sequencer.c
+++ b/sequencer.c
@@ -15,10 +15,8 @@
#include "pager.h"
#include "commit.h"
#include "sequencer.h"
-#include "tag.h"
#include "run-command.h"
#include "hook.h"
-#include "exec-cmd.h"
#include "utf8.h"
#include "cache-tree.h"
#include "diff.h"
@@ -39,7 +37,6 @@
#include "notes-utils.h"
#include "sigchain.h"
#include "unpack-trees.h"
-#include "worktree.h"
#include "oidmap.h"
#include "oidset.h"
#include "commit-slab.h"
diff --git a/setup.c b/setup.c
index bc90bbd033..0161ce747d 100644
--- a/setup.c
+++ b/setup.c
@@ -13,7 +13,6 @@
#include "string-list.h"
#include "chdir-notify.h"
#include "path.h"
-#include "promisor-remote.h"
#include "quote.h"
#include "trace2.h"
#include "worktree.h"
diff --git a/shallow.c b/shallow.c
index ac728cdd77..7711798127 100644
--- a/shallow.c
+++ b/shallow.c
@@ -7,7 +7,6 @@
#include "commit.h"
#include "tag.h"
#include "pkt-line.h"
-#include "remote.h"
#include "refs.h"
#include "oid-array.h"
#include "path.h"
diff --git a/shell.c b/shell.c
index 5c67e7bd97..2ece8b16e2 100644
--- a/shell.c
+++ b/shell.c
@@ -4,7 +4,6 @@
#include "strbuf.h"
#include "run-command.h"
#include "alias.h"
-#include "prompt.h"
#define COMMAND_DIR "git-shell-commands"
#define HELP_COMMAND COMMAND_DIR "/help"
diff --git a/submodule-config.h b/submodule-config.h
index 2a37689cc2..958f320ac6 100644
--- a/submodule-config.h
+++ b/submodule-config.h
@@ -2,9 +2,7 @@
#define SUBMODULE_CONFIG_CACHE_H
#include "config.h"
-#include "hashmap.h"
#include "submodule.h"
-#include "strbuf.h"
#include "tree-walk.h"
/**
diff --git a/submodule.c b/submodule.c
index e603a19a87..213da79f66 100644
--- a/submodule.c
+++ b/submodule.c
@@ -17,10 +17,8 @@
#include "string-list.h"
#include "oid-array.h"
#include "strvec.h"
-#include "blob.h"
#include "thread-utils.h"
#include "path.h"
-#include "quote.h"
#include "remote.h"
#include "worktree.h"
#include "parse-options.h"
@@ -30,7 +28,6 @@
#include "commit-reach.h"
#include "read-cache-ll.h"
#include "setup.h"
-#include "shallow.h"
#include "trace2.h"
static int config_update_recurse_submodules = RECURSE_SUBMODULES_OFF;
diff --git a/t/helper/test-bundle-uri.c b/t/helper/test-bundle-uri.c
index 475058592d..09dc78733c 100644
--- a/t/helper/test-bundle-uri.c
+++ b/t/helper/test-bundle-uri.c
@@ -5,9 +5,7 @@
#include "strbuf.h"
#include "string-list.h"
#include "transport.h"
-#include "ref-filter.h"
#include "remote.h"
-#include "refs.h"
enum input_mode {
KEY_VALUE_PAIRS,
diff --git a/t/helper/test-pkt-line.c b/t/helper/test-pkt-line.c
index f4d134a145..77e99c37df 100644
--- a/t/helper/test-pkt-line.c
+++ b/t/helper/test-pkt-line.c
@@ -1,6 +1,7 @@
#include "git-compat-util.h"
#include "test-tool.h"
#include "pkt-line.h"
+#include "sideband.h"
#include "write-or-die.h"
static void pack_line(const char *line)
diff --git a/t/helper/test-reach.c b/t/helper/test-reach.c
index 3e173399a0..1e159a754d 100644
--- a/t/helper/test-reach.c
+++ b/t/helper/test-reach.c
@@ -1,11 +1,9 @@
#include "test-tool.h"
#include "commit.h"
#include "commit-reach.h"
-#include "config.h"
#include "gettext.h"
#include "hex.h"
#include "object-name.h"
-#include "parse-options.h"
#include "ref-filter.h"
#include "setup.h"
#include "string-list.h"
diff --git a/t/helper/test-repository.c b/t/helper/test-repository.c
index 4cd8a952e5..0c7c5aa4dd 100644
--- a/t/helper/test-repository.c
+++ b/t/helper/test-repository.c
@@ -1,10 +1,8 @@
#include "test-tool.h"
#include "commit-graph.h"
#include "commit.h"
-#include "config.h"
#include "environment.h"
#include "hex.h"
-#include "object-store-ll.h"
#include "object.h"
#include "repository.h"
#include "setup.h"
diff --git a/t/helper/test-simple-ipc.c b/t/helper/test-simple-ipc.c
index 941ae7e3bc..fb5927775d 100644
--- a/t/helper/test-simple-ipc.c
+++ b/t/helper/test-simple-ipc.c
@@ -4,7 +4,6 @@
#include "test-tool.h"
#include "gettext.h"
-#include "strbuf.h"
#include "simple-ipc.h"
#include "parse-options.h"
#include "thread-utils.h"
diff --git a/t/helper/test-submodule.c b/t/helper/test-submodule.c
index 356e0a26c5..50c154d037 100644
--- a/t/helper/test-submodule.c
+++ b/t/helper/test-submodule.c
@@ -4,6 +4,7 @@
#include "remote.h"
#include "repository.h"
#include "setup.h"
+#include "strbuf.h"
#include "submodule-config.h"
#include "submodule.h"
diff --git a/tmp-objdir.c b/tmp-objdir.c
index 5f9074ad1c..3509258be5 100644
--- a/tmp-objdir.c
+++ b/tmp-objdir.c
@@ -6,7 +6,6 @@
#include "environment.h"
#include "object-file.h"
#include "path.h"
-#include "sigchain.h"
#include "string-list.h"
#include "strbuf.h"
#include "strvec.h"
diff --git a/trace2.c b/trace2.c
index 87d9a3a036..f1e268bd15 100644
--- a/trace2.c
+++ b/trace2.c
@@ -1,12 +1,9 @@
#include "git-compat-util.h"
#include "config.h"
-#include "json-writer.h"
-#include "quote.h"
#include "repository.h"
#include "run-command.h"
#include "sigchain.h"
#include "thread-utils.h"
-#include "version.h"
#include "trace.h"
#include "trace2.h"
#include "trace2/tr2_cfg.h"
diff --git a/trace2/tr2_ctr.c b/trace2/tr2_ctr.c
index 87cf9034fb..d3a33715c1 100644
--- a/trace2/tr2_ctr.c
+++ b/trace2/tr2_ctr.c
@@ -1,5 +1,4 @@
#include "git-compat-util.h"
-#include "thread-utils.h"
#include "trace2/tr2_tgt.h"
#include "trace2/tr2_tls.h"
#include "trace2/tr2_ctr.h"
diff --git a/trace2/tr2_tgt_normal.c b/trace2/tr2_tgt_normal.c
index 38d5ebddf6..baef48aa69 100644
--- a/trace2/tr2_tgt_normal.c
+++ b/trace2/tr2_tgt_normal.c
@@ -2,6 +2,7 @@
#include "config.h"
#include "repository.h"
#include "run-command.h"
+#include "strbuf.h"
#include "quote.h"
#include "version.h"
#include "trace2/tr2_dst.h"
diff --git a/trace2/tr2_tls.c b/trace2/tr2_tls.c
index 601c9e5036..4f75392952 100644
--- a/trace2/tr2_tls.c
+++ b/trace2/tr2_tls.c
@@ -1,4 +1,5 @@
#include "git-compat-util.h"
+#include "strbuf.h"
#include "thread-utils.h"
#include "trace.h"
#include "trace2/tr2_tls.h"
diff --git a/trace2/tr2_tls.h b/trace2/tr2_tls.h
index f9049805d4..3dfe6557fc 100644
--- a/trace2/tr2_tls.h
+++ b/trace2/tr2_tls.h
@@ -1,7 +1,6 @@
#ifndef TR2_TLS_H
#define TR2_TLS_H
-#include "strbuf.h"
#include "trace2/tr2_ctr.h"
#include "trace2/tr2_tmr.h"
diff --git a/trace2/tr2_tmr.c b/trace2/tr2_tmr.c
index 31d0e4d1bd..51f564b07a 100644
--- a/trace2/tr2_tmr.c
+++ b/trace2/tr2_tmr.c
@@ -1,5 +1,4 @@
#include "git-compat-util.h"
-#include "thread-utils.h"
#include "trace2/tr2_tgt.h"
#include "trace2/tr2_tls.h"
#include "trace2/tr2_tmr.h"
diff --git a/transport-helper.c b/transport-helper.c
index 49811ef176..e34a8f47cf 100644
--- a/transport-helper.c
+++ b/transport-helper.c
@@ -3,13 +3,11 @@
#include "quote.h"
#include "run-command.h"
#include "commit.h"
-#include "diff.h"
#include "environment.h"
#include "gettext.h"
#include "hex.h"
#include "object-name.h"
#include "repository.h"
-#include "revision.h"
#include "remote.h"
#include "string-list.h"
#include "thread-utils.h"
diff --git a/transport.c b/transport.c
index 219af8fd50..bd7899e9bf 100644
--- a/transport.c
+++ b/transport.c
@@ -10,9 +10,7 @@
#include "remote.h"
#include "connect.h"
#include "send-pack.h"
-#include "walker.h"
#include "bundle.h"
-#include "dir.h"
#include "gettext.h"
#include "refs.h"
#include "refspec.h"
@@ -26,7 +24,6 @@
#include "transport-internal.h"
#include "protocol.h"
#include "object-name.h"
-#include "object-store-ll.h"
#include "color.h"
#include "bundle-uri.h"
diff --git a/tree.c b/tree.c
index 990f9c9854..508e5fd76f 100644
--- a/tree.c
+++ b/tree.c
@@ -1,12 +1,9 @@
#include "git-compat-util.h"
-#include "cache-tree.h"
#include "hex.h"
#include "tree.h"
#include "object-name.h"
#include "object-store-ll.h"
-#include "blob.h"
#include "commit.h"
-#include "tag.h"
#include "alloc.h"
#include "tree-walk.h"
#include "repository.h"
diff --git a/upload-pack.c b/upload-pack.c
index ea234ab6a4..2537affa90 100644
--- a/upload-pack.c
+++ b/upload-pack.c
@@ -9,13 +9,10 @@
#include "repository.h"
#include "object-store-ll.h"
#include "oid-array.h"
-#include "tag.h"
#include "object.h"
#include "commit.h"
#include "diff.h"
#include "revision.h"
-#include "list-objects.h"
-#include "list-objects-filter.h"
#include "list-objects-filter-options.h"
#include "run-command.h"
#include "connect.h"
@@ -24,11 +21,8 @@
#include "string-list.h"
#include "strvec.h"
#include "trace2.h"
-#include "prio-queue.h"
#include "protocol.h"
-#include "quote.h"
#include "upload-pack.h"
-#include "serve.h"
#include "commit-graph.h"
#include "commit-reach.h"
#include "shallow.h"
diff --git a/wrapper.c b/wrapper.c
index 7da15a56da..eeac3741cf 100644
--- a/wrapper.c
+++ b/wrapper.c
@@ -5,7 +5,6 @@
#include "abspath.h"
#include "parse.h"
#include "gettext.h"
-#include "repository.h"
#include "strbuf.h"
#include "trace2.h"
diff --git a/xdiff-interface.c b/xdiff-interface.c
index d788689d01..3162f51743 100644
--- a/xdiff-interface.c
+++ b/xdiff-interface.c
@@ -7,8 +7,6 @@
#include "xdiff-interface.h"
#include "xdiff/xtypes.h"
#include "xdiff/xdiffi.h"
-#include "xdiff/xemit.h"
-#include "xdiff/xmacros.h"
#include "xdiff/xutils.h"
struct xdiff_emit_state {