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:
authorElijah Newren <newren@gmail.com>2023-02-24 03:09:27 +0300
committerJunio C Hamano <gitster@pobox.com>2023-02-24 04:25:29 +0300
commit41771fa435a44ff8be3f23753bde0309a2a65b03 (patch)
treeb0e8d11299caa6a01b56bdd5b367ed0b51ad087a
parentb73ecb48114926d063d7ab96943bafcc0ae913b6 (diff)
cache.h: remove dependence on hex.h; make other files include it explicitly
Signed-off-by: Elijah Newren <newren@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
-rw-r--r--add-interactive.c1
-rw-r--r--apply.c1
-rw-r--r--archive-tar.c1
-rw-r--r--archive-zip.c1
-rw-r--r--archive.c1
-rw-r--r--bisect.c1
-rw-r--r--blame.c1
-rw-r--r--branch.c1
-rw-r--r--builtin/am.c1
-rw-r--r--builtin/bisect.c1
-rw-r--r--builtin/blame.c1
-rw-r--r--builtin/cat-file.c1
-rw-r--r--builtin/checkout.c1
-rw-r--r--builtin/clone.c1
-rw-r--r--builtin/commit-graph.c1
-rw-r--r--builtin/commit-tree.c1
-rw-r--r--builtin/describe.c1
-rw-r--r--builtin/diff-tree.c1
-rw-r--r--builtin/difftool.c1
-rw-r--r--builtin/fast-export.c1
-rw-r--r--builtin/fast-import.c1
-rw-r--r--builtin/fetch-pack.c1
-rw-r--r--builtin/fetch.c1
-rw-r--r--builtin/fsck.c1
-rw-r--r--builtin/gc.c1
-rw-r--r--builtin/grep.c1
-rw-r--r--builtin/hash-object.c1
-rw-r--r--builtin/index-pack.c1
-rw-r--r--builtin/log.c1
-rw-r--r--builtin/ls-remote.c1
-rw-r--r--builtin/ls-tree.c1
-rw-r--r--builtin/merge-base.c1
-rw-r--r--builtin/merge-index.c1
-rw-r--r--builtin/merge-tree.c1
-rw-r--r--builtin/merge.c1
-rw-r--r--builtin/mktag.c1
-rw-r--r--builtin/mktree.c1
-rw-r--r--builtin/name-rev.c1
-rw-r--r--builtin/notes.c1
-rw-r--r--builtin/pack-objects.c1
-rw-r--r--builtin/pack-redundant.c1
-rw-r--r--builtin/patch-id.c1
-rw-r--r--builtin/prune.c1
-rw-r--r--builtin/pull.c1
-rw-r--r--builtin/read-tree.c1
-rw-r--r--builtin/rebase.c1
-rw-r--r--builtin/receive-pack.c1
-rw-r--r--builtin/repack.c1
-rw-r--r--builtin/replace.c1
-rw-r--r--builtin/reset.c1
-rw-r--r--builtin/rev-list.c1
-rw-r--r--builtin/rev-parse.c1
-rw-r--r--builtin/send-pack.c1
-rw-r--r--builtin/show-branch.c1
-rw-r--r--builtin/show-index.c1
-rw-r--r--builtin/show-ref.c1
-rw-r--r--builtin/stash.c1
-rw-r--r--builtin/submodule--helper.c1
-rw-r--r--builtin/tag.c1
-rw-r--r--builtin/unpack-file.c1
-rw-r--r--builtin/unpack-objects.c1
-rw-r--r--builtin/update-index.c1
-rw-r--r--builtin/worktree.c1
-rw-r--r--builtin/write-tree.c1
-rw-r--r--bulk-checkin.c1
-rw-r--r--bundle.c1
-rw-r--r--cache-tree.c1
-rw-r--r--cache.h1
-rw-r--r--color.c1
-rw-r--r--combine-diff.c1
-rw-r--r--commit-graph.c1
-rw-r--r--commit-reach.c1
-rw-r--r--commit.c1
-rw-r--r--compat/fsmonitor/fsm-ipc-darwin.c1
-rw-r--r--connect.c1
-rw-r--r--connected.c1
-rw-r--r--convert.c1
-rw-r--r--delta-islands.c1
-rw-r--r--diagnose.c1
-rw-r--r--diff-lib.c1
-rw-r--r--diff.c1
-rw-r--r--entry.c1
-rw-r--r--fetch-pack.c1
-rw-r--r--fmt-merge-msg.c1
-rw-r--r--fsck.c1
-rw-r--r--grep.c1
-rw-r--r--http-backend.c1
-rw-r--r--http-fetch.c1
-rw-r--r--http-push.c1
-rw-r--r--http-walker.c1
-rw-r--r--http.c1
-rw-r--r--line-log.c1
-rw-r--r--list-objects-filter.c1
-rw-r--r--list-objects.c1
-rw-r--r--log-tree.c1
-rw-r--r--ls-refs.c1
-rw-r--r--match-trees.c1
-rw-r--r--merge-ort.c1
-rw-r--r--merge-recursive.c1
-rw-r--r--merge.c1
-rw-r--r--midx.c1
-rw-r--r--negotiator/skipping.c1
-rw-r--r--notes-merge.c1
-rw-r--r--notes.c1
-rw-r--r--object-file.c1
-rw-r--r--object-name.c1
-rw-r--r--object.c1
-rw-r--r--pack-bitmap-write.c1
-rw-r--r--pack-bitmap.c1
-rw-r--r--pack-check.c1
-rw-r--r--pack-write.c1
-rw-r--r--packfile.c1
-rw-r--r--parallel-checkout.c1
-rw-r--r--patch-ids.c1
-rw-r--r--path.c1
-rw-r--r--pkt-line.c1
-rw-r--r--pretty.c1
-rw-r--r--promisor-remote.c1
-rw-r--r--protocol-caps.c1
-rw-r--r--reachable.c1
-rw-r--r--read-cache.c1
-rw-r--r--ref-filter.c1
-rw-r--r--refs.c1
-rw-r--r--refs/debug.c1
-rw-r--r--refs/files-backend.c1
-rw-r--r--refs/packed-backend.c1
-rw-r--r--refspec.c1
-rw-r--r--remote-curl.c1
-rw-r--r--remote.c1
-rw-r--r--replace-object.c1
-rw-r--r--rerere.c1
-rw-r--r--reset.c1
-rw-r--r--revision.c1
-rw-r--r--send-pack.c1
-rw-r--r--sequencer.c1
-rw-r--r--server-info.c1
-rw-r--r--sha1dc_git.c1
-rw-r--r--shallow.c1
-rw-r--r--strbuf.c1
-rw-r--r--strvec.c1
-rw-r--r--submodule-config.c1
-rw-r--r--submodule.c1
-rw-r--r--t/helper/test-bloom.c1
-rw-r--r--t/helper/test-cache-tree.c1
-rw-r--r--t/helper/test-dump-cache-tree.c1
-rw-r--r--t/helper/test-dump-split-index.c1
-rw-r--r--t/helper/test-dump-untracked-cache.c1
-rw-r--r--t/helper/test-fast-rebase.c1
-rw-r--r--t/helper/test-hash.c1
-rw-r--r--t/helper/test-match-trees.c1
-rw-r--r--t/helper/test-oid-array.c1
-rw-r--r--t/helper/test-oidmap.c1
-rw-r--r--t/helper/test-oidtree.c1
-rw-r--r--t/helper/test-pack-mtimes.c1
-rw-r--r--t/helper/test-partial-clone.c1
-rw-r--r--t/helper/test-proc-receive.c1
-rw-r--r--t/helper/test-reach.c1
-rw-r--r--t/helper/test-read-midx.c1
-rw-r--r--t/helper/test-ref-store.c1
-rw-r--r--t/helper/test-repository.c1
-rw-r--r--tag.c1
-rw-r--r--trace2/tr2_sid.c1
-rw-r--r--transport-helper.c1
-rw-r--r--transport.c1
-rw-r--r--tree-walk.c1
-rw-r--r--tree.c1
-rw-r--r--unpack-trees.c1
-rw-r--r--upload-pack.c1
-rw-r--r--url.c1
-rw-r--r--urlmatch.c1
-rw-r--r--walker.c1
-rw-r--r--wt-status.c1
-rw-r--r--xdiff-interface.c1
173 files changed, 172 insertions, 1 deletions
diff --git a/add-interactive.c b/add-interactive.c
index 00a0f6f96f..ae25ec50bc 100644
--- a/add-interactive.c
+++ b/add-interactive.c
@@ -3,6 +3,7 @@
#include "color.h"
#include "config.h"
#include "diffcore.h"
+#include "hex.h"
#include "revision.h"
#include "refs.h"
#include "string-list.h"
diff --git a/apply.c b/apply.c
index 7f12ebf04c..8776ab939a 100644
--- a/apply.c
+++ b/apply.c
@@ -15,6 +15,7 @@
#include "delta.h"
#include "diff.h"
#include "dir.h"
+#include "hex.h"
#include "xdiff-interface.h"
#include "ll-merge.h"
#include "lockfile.h"
diff --git a/archive-tar.c b/archive-tar.c
index 9406f03e80..ee27fa0b39 100644
--- a/archive-tar.c
+++ b/archive-tar.c
@@ -4,6 +4,7 @@
#include "git-compat-util.h"
#include "alloc.h"
#include "config.h"
+#include "hex.h"
#include "tar.h"
#include "archive.h"
#include "object-store.h"
diff --git a/archive-zip.c b/archive-zip.c
index 0456f1ebf1..c5d1f72eb8 100644
--- a/archive-zip.c
+++ b/archive-zip.c
@@ -4,6 +4,7 @@
#include "cache.h"
#include "config.h"
#include "archive.h"
+#include "hex.h"
#include "streaming.h"
#include "utf8.h"
#include "object-store.h"
diff --git a/archive.c b/archive.c
index 35719e5e36..c7869ae906 100644
--- a/archive.c
+++ b/archive.c
@@ -1,6 +1,7 @@
#include "git-compat-util.h"
#include "alloc.h"
#include "config.h"
+#include "hex.h"
#include "refs.h"
#include "object-store.h"
#include "commit.h"
diff --git a/bisect.c b/bisect.c
index ef5ee5a643..1409150c5c 100644
--- a/bisect.c
+++ b/bisect.c
@@ -2,6 +2,7 @@
#include "config.h"
#include "commit.h"
#include "diff.h"
+#include "hex.h"
#include "revision.h"
#include "refs.h"
#include "list-objects.h"
diff --git a/blame.c b/blame.c
index 8bfeaa1c63..e45d8a3bf9 100644
--- a/blame.c
+++ b/blame.c
@@ -5,6 +5,7 @@
#include "mergesort.h"
#include "diff.h"
#include "diffcore.h"
+#include "hex.h"
#include "tag.h"
#include "blame.h"
#include "alloc.h"
diff --git a/branch.c b/branch.c
index e5614b53b3..5aaf073dce 100644
--- a/branch.c
+++ b/branch.c
@@ -2,6 +2,7 @@
#include "cache.h"
#include "config.h"
#include "branch.h"
+#include "hex.h"
#include "refs.h"
#include "refspec.h"
#include "remote.h"
diff --git a/builtin/am.c b/builtin/am.c
index e0848ddadf..3b5ea50cc5 100644
--- a/builtin/am.c
+++ b/builtin/am.c
@@ -8,6 +8,7 @@
#include "config.h"
#include "builtin.h"
#include "exec-cmd.h"
+#include "hex.h"
#include "parse-options.h"
#include "dir.h"
#include "run-command.h"
diff --git a/builtin/bisect.c b/builtin/bisect.c
index 7301740267..e8ee4a4dc8 100644
--- a/builtin/bisect.c
+++ b/builtin/bisect.c
@@ -1,5 +1,6 @@
#include "builtin.h"
#include "cache.h"
+#include "hex.h"
#include "parse-options.h"
#include "bisect.h"
#include "refs.h"
diff --git a/builtin/blame.c b/builtin/blame.c
index 4d1609c9ac..fdd9f0c0fc 100644
--- a/builtin/blame.c
+++ b/builtin/blame.c
@@ -10,6 +10,7 @@
#include "config.h"
#include "color.h"
#include "builtin.h"
+#include "hex.h"
#include "repository.h"
#include "commit.h"
#include "diff.h"
diff --git a/builtin/cat-file.c b/builtin/cat-file.c
index 5b8be7cb63..3040016e27 100644
--- a/builtin/cat-file.c
+++ b/builtin/cat-file.c
@@ -9,6 +9,7 @@
#include "config.h"
#include "builtin.h"
#include "diff.h"
+#include "hex.h"
#include "parse-options.h"
#include "userdiff.h"
#include "streaming.h"
diff --git a/builtin/checkout.c b/builtin/checkout.c
index a5155cf55c..21a4335abb 100644
--- a/builtin/checkout.c
+++ b/builtin/checkout.c
@@ -9,6 +9,7 @@
#include "config.h"
#include "diff.h"
#include "dir.h"
+#include "hex.h"
#include "hook.h"
#include "ll-merge.h"
#include "lockfile.h"
diff --git a/builtin/clone.c b/builtin/clone.c
index 65b5b7db6d..462c286274 100644
--- a/builtin/clone.c
+++ b/builtin/clone.c
@@ -11,6 +11,7 @@
#define USE_THE_INDEX_VARIABLE
#include "builtin.h"
#include "config.h"
+#include "hex.h"
#include "lockfile.h"
#include "parse-options.h"
#include "fetch-pack.h"
diff --git a/builtin/commit-graph.c b/builtin/commit-graph.c
index 93704f95a9..6dc83dc51b 100644
--- a/builtin/commit-graph.c
+++ b/builtin/commit-graph.c
@@ -1,6 +1,7 @@
#include "builtin.h"
#include "config.h"
#include "dir.h"
+#include "hex.h"
#include "lockfile.h"
#include "parse-options.h"
#include "repository.h"
diff --git a/builtin/commit-tree.c b/builtin/commit-tree.c
index cc8d584be2..fefeed5d4b 100644
--- a/builtin/commit-tree.c
+++ b/builtin/commit-tree.c
@@ -5,6 +5,7 @@
*/
#include "cache.h"
#include "config.h"
+#include "hex.h"
#include "object-store.h"
#include "repository.h"
#include "commit.h"
diff --git a/builtin/describe.c b/builtin/describe.c
index eea1e330c0..5b5930f5c8 100644
--- a/builtin/describe.c
+++ b/builtin/describe.c
@@ -1,6 +1,7 @@
#define USE_THE_INDEX_VARIABLE
#include "cache.h"
#include "config.h"
+#include "hex.h"
#include "lockfile.h"
#include "commit.h"
#include "tag.h"
diff --git a/builtin/diff-tree.c b/builtin/diff-tree.c
index 25b853b85c..a393efa4f0 100644
--- a/builtin/diff-tree.c
+++ b/builtin/diff-tree.c
@@ -3,6 +3,7 @@
#include "config.h"
#include "diff.h"
#include "commit.h"
+#include "hex.h"
#include "log-tree.h"
#include "builtin.h"
#include "submodule.h"
diff --git a/builtin/difftool.c b/builtin/difftool.c
index dbbfb19f19..01681d0fb8 100644
--- a/builtin/difftool.c
+++ b/builtin/difftool.c
@@ -17,6 +17,7 @@
#include "builtin.h"
#include "run-command.h"
#include "exec-cmd.h"
+#include "hex.h"
#include "parse-options.h"
#include "strvec.h"
#include "strbuf.h"
diff --git a/builtin/fast-export.c b/builtin/fast-export.c
index 39a890fc00..78493c6d2b 100644
--- a/builtin/fast-export.c
+++ b/builtin/fast-export.c
@@ -6,6 +6,7 @@
#include "builtin.h"
#include "cache.h"
#include "config.h"
+#include "hex.h"
#include "refs.h"
#include "refspec.h"
#include "object-store.h"
diff --git a/builtin/fast-import.c b/builtin/fast-import.c
index 7134683ab9..160e2eedb7 100644
--- a/builtin/fast-import.c
+++ b/builtin/fast-import.c
@@ -1,5 +1,6 @@
#include "builtin.h"
#include "cache.h"
+#include "hex.h"
#include "repository.h"
#include "config.h"
#include "lockfile.h"
diff --git a/builtin/fetch-pack.c b/builtin/fetch-pack.c
index 113f22c09d..702c9a3397 100644
--- a/builtin/fetch-pack.c
+++ b/builtin/fetch-pack.c
@@ -1,5 +1,6 @@
#include "builtin.h"
#include "alloc.h"
+#include "hex.h"
#include "pkt-line.h"
#include "fetch-pack.h"
#include "remote.h"
diff --git a/builtin/fetch.c b/builtin/fetch.c
index a21ce89312..a77099ba88 100644
--- a/builtin/fetch.c
+++ b/builtin/fetch.c
@@ -3,6 +3,7 @@
*/
#include "cache.h"
#include "config.h"
+#include "hex.h"
#include "repository.h"
#include "refs.h"
#include "refspec.h"
diff --git a/builtin/fsck.c b/builtin/fsck.c
index d207bd909b..af0fab660d 100644
--- a/builtin/fsck.c
+++ b/builtin/fsck.c
@@ -1,6 +1,7 @@
#define USE_THE_INDEX_VARIABLE
#include "builtin.h"
#include "cache.h"
+#include "hex.h"
#include "repository.h"
#include "config.h"
#include "commit.h"
diff --git a/builtin/gc.c b/builtin/gc.c
index 02455fdcd7..67c7fe8a6e 100644
--- a/builtin/gc.c
+++ b/builtin/gc.c
@@ -11,6 +11,7 @@
*/
#include "builtin.h"
+#include "hex.h"
#include "repository.h"
#include "config.h"
#include "tempfile.h"
diff --git a/builtin/grep.c b/builtin/grep.c
index a08e5841dd..c590fcb19d 100644
--- a/builtin/grep.c
+++ b/builtin/grep.c
@@ -5,6 +5,7 @@
*/
#include "cache.h"
#include "alloc.h"
+#include "hex.h"
#include "repository.h"
#include "config.h"
#include "blob.h"
diff --git a/builtin/hash-object.c b/builtin/hash-object.c
index 44db83f07f..1848768b97 100644
--- a/builtin/hash-object.c
+++ b/builtin/hash-object.c
@@ -6,6 +6,7 @@
*/
#include "builtin.h"
#include "config.h"
+#include "hex.h"
#include "object-store.h"
#include "blob.h"
#include "quote.h"
diff --git a/builtin/index-pack.c b/builtin/index-pack.c
index 7e4b69f9a3..21c0e109dd 100644
--- a/builtin/index-pack.c
+++ b/builtin/index-pack.c
@@ -2,6 +2,7 @@
#include "alloc.h"
#include "config.h"
#include "delta.h"
+#include "hex.h"
#include "pack.h"
#include "csum-file.h"
#include "blob.h"
diff --git a/builtin/log.c b/builtin/log.c
index 85540963d9..99489bcb64 100644
--- a/builtin/log.c
+++ b/builtin/log.c
@@ -7,6 +7,7 @@
#include "git-compat-util.h"
#include "alloc.h"
#include "config.h"
+#include "hex.h"
#include "refs.h"
#include "object-store.h"
#include "color.h"
diff --git a/builtin/ls-remote.c b/builtin/ls-remote.c
index 6516177348..2dfbd8ed9b 100644
--- a/builtin/ls-remote.c
+++ b/builtin/ls-remote.c
@@ -1,5 +1,6 @@
#include "builtin.h"
#include "cache.h"
+#include "hex.h"
#include "transport.h"
#include "ref-filter.h"
#include "remote.h"
diff --git a/builtin/ls-tree.c b/builtin/ls-tree.c
index 8cc8c995df..64d8e54318 100644
--- a/builtin/ls-tree.c
+++ b/builtin/ls-tree.c
@@ -5,6 +5,7 @@
*/
#include "cache.h"
#include "config.h"
+#include "hex.h"
#include "object-store.h"
#include "blob.h"
#include "tree.h"
diff --git a/builtin/merge-base.c b/builtin/merge-base.c
index 6f3941f2a4..be8f3b221c 100644
--- a/builtin/merge-base.c
+++ b/builtin/merge-base.c
@@ -2,6 +2,7 @@
#include "cache.h"
#include "config.h"
#include "commit.h"
+#include "hex.h"
#include "refs.h"
#include "diff.h"
#include "revision.h"
diff --git a/builtin/merge-index.c b/builtin/merge-index.c
index 452f833ac4..c875f5d37e 100644
--- a/builtin/merge-index.c
+++ b/builtin/merge-index.c
@@ -1,5 +1,6 @@
#define USE_THE_INDEX_VARIABLE
#include "builtin.h"
+#include "hex.h"
#include "run-command.h"
static const char *pgm;
diff --git a/builtin/merge-tree.c b/builtin/merge-tree.c
index 828dc81c42..e782518164 100644
--- a/builtin/merge-tree.c
+++ b/builtin/merge-tree.c
@@ -3,6 +3,7 @@
#include "tree-walk.h"
#include "xdiff-interface.h"
#include "help.h"
+#include "hex.h"
#include "commit.h"
#include "commit-reach.h"
#include "merge-ort.h"
diff --git a/builtin/merge.c b/builtin/merge.c
index 716a23f880..7347b738e5 100644
--- a/builtin/merge.c
+++ b/builtin/merge.c
@@ -10,6 +10,7 @@
#include "cache.h"
#include "alloc.h"
#include "config.h"
+#include "hex.h"
#include "parse-options.h"
#include "builtin.h"
#include "lockfile.h"
diff --git a/builtin/mktag.c b/builtin/mktag.c
index 5d22909122..42c2457c70 100644
--- a/builtin/mktag.c
+++ b/builtin/mktag.c
@@ -1,4 +1,5 @@
#include "builtin.h"
+#include "hex.h"
#include "parse-options.h"
#include "tag.h"
#include "replace-object.h"
diff --git a/builtin/mktree.c b/builtin/mktree.c
index ec721ffb94..848c7b4747 100644
--- a/builtin/mktree.c
+++ b/builtin/mktree.c
@@ -5,6 +5,7 @@
*/
#include "builtin.h"
#include "alloc.h"
+#include "hex.h"
#include "quote.h"
#include "tree.h"
#include "parse-options.h"
diff --git a/builtin/name-rev.c b/builtin/name-rev.c
index 29752e7afe..723ba616a8 100644
--- a/builtin/name-rev.c
+++ b/builtin/name-rev.c
@@ -1,5 +1,6 @@
#include "builtin.h"
#include "alloc.h"
+#include "hex.h"
#include "repository.h"
#include "config.h"
#include "commit.h"
diff --git a/builtin/notes.c b/builtin/notes.c
index 80d9dfd25c..bba4c2e39f 100644
--- a/builtin/notes.c
+++ b/builtin/notes.c
@@ -10,6 +10,7 @@
#include "cache.h"
#include "config.h"
#include "builtin.h"
+#include "hex.h"
#include "notes.h"
#include "object-store.h"
#include "repository.h"
diff --git a/builtin/pack-objects.c b/builtin/pack-objects.c
index 72c33fd739..2b5e85988c 100644
--- a/builtin/pack-objects.c
+++ b/builtin/pack-objects.c
@@ -1,5 +1,6 @@
#include "builtin.h"
#include "alloc.h"
+#include "hex.h"
#include "repository.h"
#include "config.h"
#include "attr.h"
diff --git a/builtin/pack-redundant.c b/builtin/pack-redundant.c
index ecd49ca268..82115c5808 100644
--- a/builtin/pack-redundant.c
+++ b/builtin/pack-redundant.c
@@ -7,6 +7,7 @@
*/
#include "builtin.h"
+#include "hex.h"
#include "repository.h"
#include "packfile.h"
#include "object-store.h"
diff --git a/builtin/patch-id.c b/builtin/patch-id.c
index f840fbf1c7..338b15cd7b 100644
--- a/builtin/patch-id.c
+++ b/builtin/patch-id.c
@@ -2,6 +2,7 @@
#include "builtin.h"
#include "config.h"
#include "diff.h"
+#include "hex.h"
#include "parse-options.h"
static void flush_current_id(int patchlen, struct object_id *id, struct object_id *result)
diff --git a/builtin/prune.c b/builtin/prune.c
index 2719220108..db767b7a8f 100644
--- a/builtin/prune.c
+++ b/builtin/prune.c
@@ -1,6 +1,7 @@
#include "cache.h"
#include "commit.h"
#include "diff.h"
+#include "hex.h"
#include "revision.h"
#include "builtin.h"
#include "reachable.h"
diff --git a/builtin/pull.c b/builtin/pull.c
index 1ab4de0005..963a47f0b8 100644
--- a/builtin/pull.c
+++ b/builtin/pull.c
@@ -9,6 +9,7 @@
#include "cache.h"
#include "config.h"
#include "builtin.h"
+#include "hex.h"
#include "parse-options.h"
#include "exec-cmd.h"
#include "run-command.h"
diff --git a/builtin/read-tree.c b/builtin/read-tree.c
index 3ce7541783..018fa9cde2 100644
--- a/builtin/read-tree.c
+++ b/builtin/read-tree.c
@@ -7,6 +7,7 @@
#define USE_THE_INDEX_VARIABLE
#include "cache.h"
#include "config.h"
+#include "hex.h"
#include "lockfile.h"
#include "object.h"
#include "tree.h"
diff --git a/builtin/rebase.c b/builtin/rebase.c
index 6635f10d52..ef8ce2f72c 100644
--- a/builtin/rebase.c
+++ b/builtin/rebase.c
@@ -6,6 +6,7 @@
#define USE_THE_INDEX_VARIABLE
#include "builtin.h"
+#include "hex.h"
#include "run-command.h"
#include "exec-cmd.h"
#include "strvec.h"
diff --git a/builtin/receive-pack.c b/builtin/receive-pack.c
index cd5c7a28ef..3d2b4c8b4f 100644
--- a/builtin/receive-pack.c
+++ b/builtin/receive-pack.c
@@ -1,6 +1,7 @@
#include "builtin.h"
#include "repository.h"
#include "config.h"
+#include "hex.h"
#include "lockfile.h"
#include "pack.h"
#include "refs.h"
diff --git a/builtin/repack.c b/builtin/repack.c
index 545b368168..966430a465 100644
--- a/builtin/repack.c
+++ b/builtin/repack.c
@@ -2,6 +2,7 @@
#include "alloc.h"
#include "config.h"
#include "dir.h"
+#include "hex.h"
#include "parse-options.h"
#include "run-command.h"
#include "sigchain.h"
diff --git a/builtin/replace.c b/builtin/replace.c
index a29e911d30..cdcb39f737 100644
--- a/builtin/replace.c
+++ b/builtin/replace.c
@@ -11,6 +11,7 @@
#include "cache.h"
#include "config.h"
#include "builtin.h"
+#include "hex.h"
#include "refs.h"
#include "parse-options.h"
#include "run-command.h"
diff --git a/builtin/reset.c b/builtin/reset.c
index 0697fa89de..58f567afd3 100644
--- a/builtin/reset.c
+++ b/builtin/reset.c
@@ -10,6 +10,7 @@
#define USE_THE_INDEX_VARIABLE
#include "builtin.h"
#include "config.h"
+#include "hex.h"
#include "lockfile.h"
#include "tag.h"
#include "object.h"
diff --git a/builtin/rev-list.c b/builtin/rev-list.c
index d42db0b0cc..e4c9b74762 100644
--- a/builtin/rev-list.c
+++ b/builtin/rev-list.c
@@ -2,6 +2,7 @@
#include "config.h"
#include "commit.h"
#include "diff.h"
+#include "hex.h"
#include "revision.h"
#include "list-objects.h"
#include "list-objects-filter.h"
diff --git a/builtin/rev-parse.c b/builtin/rev-parse.c
index fd4f59ff2b..e1fa9c6348 100644
--- a/builtin/rev-parse.c
+++ b/builtin/rev-parse.c
@@ -8,6 +8,7 @@
#include "alloc.h"
#include "config.h"
#include "commit.h"
+#include "hex.h"
#include "refs.h"
#include "quote.h"
#include "builtin.h"
diff --git a/builtin/send-pack.c b/builtin/send-pack.c
index 4c5d125fa0..127ced435d 100644
--- a/builtin/send-pack.c
+++ b/builtin/send-pack.c
@@ -1,6 +1,7 @@
#include "builtin.h"
#include "config.h"
#include "commit.h"
+#include "hex.h"
#include "refs.h"
#include "pkt-line.h"
#include "sideband.h"
diff --git a/builtin/show-branch.c b/builtin/show-branch.c
index 358ac3e519..8342b68aef 100644
--- a/builtin/show-branch.c
+++ b/builtin/show-branch.c
@@ -1,5 +1,6 @@
#include "cache.h"
#include "config.h"
+#include "hex.h"
#include "pretty.h"
#include "refs.h"
#include "builtin.h"
diff --git a/builtin/show-index.c b/builtin/show-index.c
index 0e0b9fb95b..98ec40ddf4 100644
--- a/builtin/show-index.c
+++ b/builtin/show-index.c
@@ -1,5 +1,6 @@
#include "builtin.h"
#include "cache.h"
+#include "hex.h"
#include "pack.h"
#include "parse-options.h"
diff --git a/builtin/show-ref.c b/builtin/show-ref.c
index 3af6a53ee9..1f28d7fe4b 100644
--- a/builtin/show-ref.c
+++ b/builtin/show-ref.c
@@ -1,6 +1,7 @@
#include "builtin.h"
#include "cache.h"
#include "config.h"
+#include "hex.h"
#include "refs.h"
#include "object-store.h"
#include "object.h"
diff --git a/builtin/stash.c b/builtin/stash.c
index 3a4f9fd566..6a12fed271 100644
--- a/builtin/stash.c
+++ b/builtin/stash.c
@@ -1,6 +1,7 @@
#define USE_THE_INDEX_VARIABLE
#include "builtin.h"
#include "config.h"
+#include "hex.h"
#include "parse-options.h"
#include "refs.h"
#include "lockfile.h"
diff --git a/builtin/submodule--helper.c b/builtin/submodule--helper.c
index 9edc785d8d..2bbabbb28e 100644
--- a/builtin/submodule--helper.c
+++ b/builtin/submodule--helper.c
@@ -1,6 +1,7 @@
#define USE_THE_INDEX_VARIABLE
#include "builtin.h"
#include "alloc.h"
+#include "hex.h"
#include "repository.h"
#include "cache.h"
#include "config.h"
diff --git a/builtin/tag.c b/builtin/tag.c
index d428c45dc8..be094882d0 100644
--- a/builtin/tag.c
+++ b/builtin/tag.c
@@ -9,6 +9,7 @@
#include "cache.h"
#include "config.h"
#include "builtin.h"
+#include "hex.h"
#include "refs.h"
#include "object-store.h"
#include "tag.h"
diff --git a/builtin/unpack-file.c b/builtin/unpack-file.c
index 88de32b7d7..e9b105a539 100644
--- a/builtin/unpack-file.c
+++ b/builtin/unpack-file.c
@@ -1,5 +1,6 @@
#include "builtin.h"
#include "config.h"
+#include "hex.h"
#include "object-store.h"
static char *create_temp_file(struct object_id *oid)
diff --git a/builtin/unpack-objects.c b/builtin/unpack-objects.c
index 43789b8ef2..e125b12188 100644
--- a/builtin/unpack-objects.c
+++ b/builtin/unpack-objects.c
@@ -2,6 +2,7 @@
#include "cache.h"
#include "bulk-checkin.h"
#include "config.h"
+#include "hex.h"
#include "object-store.h"
#include "object.h"
#include "delta.h"
diff --git a/builtin/update-index.c b/builtin/update-index.c
index bf38885d54..11dc135271 100644
--- a/builtin/update-index.c
+++ b/builtin/update-index.c
@@ -7,6 +7,7 @@
#include "cache.h"
#include "bulk-checkin.h"
#include "config.h"
+#include "hex.h"
#include "lockfile.h"
#include "quote.h"
#include "cache-tree.h"
diff --git a/builtin/worktree.c b/builtin/worktree.c
index 254283aa6f..80d05e246d 100644
--- a/builtin/worktree.c
+++ b/builtin/worktree.c
@@ -3,6 +3,7 @@
#include "config.h"
#include "builtin.h"
#include "dir.h"
+#include "hex.h"
#include "parse-options.h"
#include "strvec.h"
#include "branch.h"
diff --git a/builtin/write-tree.c b/builtin/write-tree.c
index 078010315f..7ad0d05945 100644
--- a/builtin/write-tree.c
+++ b/builtin/write-tree.c
@@ -7,6 +7,7 @@
#include "builtin.h"
#include "cache.h"
#include "config.h"
+#include "hex.h"
#include "tree.h"
#include "cache-tree.h"
#include "parse-options.h"
diff --git a/bulk-checkin.c b/bulk-checkin.c
index 62ed104c7e..d64cd5c52d 100644
--- a/bulk-checkin.c
+++ b/bulk-checkin.c
@@ -4,6 +4,7 @@
#include "git-compat-util.h"
#include "alloc.h"
#include "bulk-checkin.h"
+#include "hex.h"
#include "lockfile.h"
#include "repository.h"
#include "csum-file.h"
diff --git a/bundle.c b/bundle.c
index 6ab6cd7378..99d7de97f6 100644
--- a/bundle.c
+++ b/bundle.c
@@ -1,6 +1,7 @@
#include "cache.h"
#include "lockfile.h"
#include "bundle.h"
+#include "hex.h"
#include "object-store.h"
#include "repository.h"
#include "object.h"
diff --git a/cache-tree.c b/cache-tree.c
index 256f98c3c3..9d46ecef09 100644
--- a/cache-tree.c
+++ b/cache-tree.c
@@ -1,5 +1,6 @@
#include "git-compat-util.h"
#include "alloc.h"
+#include "hex.h"
#include "lockfile.h"
#include "tree.h"
#include "tree-walk.h"
diff --git a/cache.h b/cache.h
index d0619ce2e6..0c631e75b5 100644
--- a/cache.h
+++ b/cache.h
@@ -13,7 +13,6 @@
#include "string-list.h"
#include "pack-revindex.h"
#include "hash.h"
-#include "hex.h"
#include "path.h"
#include "oid-array.h"
#include "repository.h"
diff --git a/color.c b/color.c
index f05d8a81d7..6b577ce0a7 100644
--- a/color.c
+++ b/color.c
@@ -1,6 +1,7 @@
#include "cache.h"
#include "config.h"
#include "color.h"
+#include "hex.h"
static int git_use_color_default = GIT_COLOR_AUTO;
int color_stdout_is_tty = -1;
diff --git a/combine-diff.c b/combine-diff.c
index 1a39b5dde0..91051dc325 100644
--- a/combine-diff.c
+++ b/combine-diff.c
@@ -4,6 +4,7 @@
#include "blob.h"
#include "diff.h"
#include "diffcore.h"
+#include "hex.h"
#include "quote.h"
#include "xdiff-interface.h"
#include "xdiff/xmacros.h"
diff --git a/commit-graph.c b/commit-graph.c
index c11b59f28b..5e6098ff35 100644
--- a/commit-graph.c
+++ b/commit-graph.c
@@ -1,5 +1,6 @@
#include "git-compat-util.h"
#include "config.h"
+#include "hex.h"
#include "lockfile.h"
#include "pack.h"
#include "packfile.h"
diff --git a/commit-reach.c b/commit-reach.c
index 1f0ddc5c88..5ba822a720 100644
--- a/commit-reach.c
+++ b/commit-reach.c
@@ -3,6 +3,7 @@
#include "commit.h"
#include "commit-graph.h"
#include "decorate.h"
+#include "hex.h"
#include "prio-queue.h"
#include "tree.h"
#include "ref-filter.h"
diff --git a/commit.c b/commit.c
index e433c33bb0..cb683a6df5 100644
--- a/commit.c
+++ b/commit.c
@@ -2,6 +2,7 @@
#include "tag.h"
#include "commit.h"
#include "commit-graph.h"
+#include "hex.h"
#include "repository.h"
#include "object-store.h"
#include "pkt-line.h"
diff --git a/compat/fsmonitor/fsm-ipc-darwin.c b/compat/fsmonitor/fsm-ipc-darwin.c
index d67b0ee50d..eb25123fa1 100644
--- a/compat/fsmonitor/fsm-ipc-darwin.c
+++ b/compat/fsmonitor/fsm-ipc-darwin.c
@@ -1,5 +1,6 @@
#include "cache.h"
#include "config.h"
+#include "hex.h"
#include "strbuf.h"
#include "fsmonitor.h"
#include "fsmonitor-ipc.h"
diff --git a/connect.c b/connect.c
index 63e59641c0..134069574a 100644
--- a/connect.c
+++ b/connect.c
@@ -1,6 +1,7 @@
#include "git-compat-util.h"
#include "cache.h"
#include "config.h"
+#include "hex.h"
#include "pkt-line.h"
#include "quote.h"
#include "refs.h"
diff --git a/connected.c b/connected.c
index b90fd61790..39cb1e1074 100644
--- a/connected.c
+++ b/connected.c
@@ -1,4 +1,5 @@
#include "cache.h"
+#include "hex.h"
#include "object-store.h"
#include "run-command.h"
#include "sigchain.h"
diff --git a/convert.c b/convert.c
index a54d1690c0..349c7e4af1 100644
--- a/convert.c
+++ b/convert.c
@@ -1,5 +1,6 @@
#include "cache.h"
#include "config.h"
+#include "hex.h"
#include "object-store.h"
#include "attr.h"
#include "run-command.h"
diff --git a/delta-islands.c b/delta-islands.c
index 1cfdc2cc04..c3785135fb 100644
--- a/delta-islands.c
+++ b/delta-islands.c
@@ -4,6 +4,7 @@
#include "object.h"
#include "blob.h"
#include "commit.h"
+#include "hex.h"
#include "tag.h"
#include "tree.h"
#include "delta.h"
diff --git a/diagnose.c b/diagnose.c
index 8f26569896..4a8ee4e5cf 100644
--- a/diagnose.c
+++ b/diagnose.c
@@ -4,6 +4,7 @@
#include "archive.h"
#include "dir.h"
#include "help.h"
+#include "hex.h"
#include "strvec.h"
#include "object-store.h"
#include "packfile.h"
diff --git a/diff-lib.c b/diff-lib.c
index dec040c366..70b3578b90 100644
--- a/diff-lib.c
+++ b/diff-lib.c
@@ -6,6 +6,7 @@
#include "commit.h"
#include "diff.h"
#include "diffcore.h"
+#include "hex.h"
#include "revision.h"
#include "cache-tree.h"
#include "unpack-trees.h"
diff --git a/diff.c b/diff.c
index 3c3565995d..ec911bdf18 100644
--- a/diff.c
+++ b/diff.c
@@ -9,6 +9,7 @@
#include "diff.h"
#include "diffcore.h"
#include "delta.h"
+#include "hex.h"
#include "xdiff-interface.h"
#include "color.h"
#include "attr.h"
diff --git a/entry.c b/entry.c
index 971ab26871..c97cfa833b 100644
--- a/entry.c
+++ b/entry.c
@@ -2,6 +2,7 @@
#include "blob.h"
#include "object-store.h"
#include "dir.h"
+#include "hex.h"
#include "streaming.h"
#include "submodule.h"
#include "progress.h"
diff --git a/fetch-pack.c b/fetch-pack.c
index 271e2a6fbd..95a992bcd4 100644
--- a/fetch-pack.c
+++ b/fetch-pack.c
@@ -2,6 +2,7 @@
#include "alloc.h"
#include "repository.h"
#include "config.h"
+#include "hex.h"
#include "lockfile.h"
#include "refs.h"
#include "pkt-line.h"
diff --git a/fmt-merge-msg.c b/fmt-merge-msg.c
index d4d6fd3d9d..9609eb3cef 100644
--- a/fmt-merge-msg.c
+++ b/fmt-merge-msg.c
@@ -5,6 +5,7 @@
#include "object-store.h"
#include "diff.h"
#include "diff-merges.h"
+#include "hex.h"
#include "revision.h"
#include "tag.h"
#include "string-list.h"
diff --git a/fsck.c b/fsck.c
index 20e1aac39a..871c0a9a25 100644
--- a/fsck.c
+++ b/fsck.c
@@ -1,5 +1,6 @@
#include "git-compat-util.h"
#include "alloc.h"
+#include "hex.h"
#include "object-store.h"
#include "repository.h"
#include "object.h"
diff --git a/grep.c b/grep.c
index cee44a78d0..68e9328dfd 100644
--- a/grep.c
+++ b/grep.c
@@ -1,6 +1,7 @@
#include "cache.h"
#include "config.h"
#include "grep.h"
+#include "hex.h"
#include "object-store.h"
#include "userdiff.h"
#include "xdiff-interface.h"
diff --git a/http-backend.c b/http-backend.c
index d756d120dc..45290031e0 100644
--- a/http-backend.c
+++ b/http-backend.c
@@ -1,6 +1,7 @@
#include "git-compat-util.h"
#include "alloc.h"
#include "config.h"
+#include "hex.h"
#include "repository.h"
#include "refs.h"
#include "pkt-line.h"
diff --git a/http-fetch.c b/http-fetch.c
index 258fec2068..8db35b9767 100644
--- a/http-fetch.c
+++ b/http-fetch.c
@@ -1,6 +1,7 @@
#include "cache.h"
#include "config.h"
#include "exec-cmd.h"
+#include "hex.h"
#include "http.h"
#include "walker.h"
#include "strvec.h"
diff --git a/http-push.c b/http-push.c
index 7f71316456..88aa045ecb 100644
--- a/http-push.c
+++ b/http-push.c
@@ -1,4 +1,5 @@
#include "cache.h"
+#include "hex.h"
#include "repository.h"
#include "commit.h"
#include "tag.h"
diff --git a/http-walker.c b/http-walker.c
index b8f0f98ae1..c3e902c40e 100644
--- a/http-walker.c
+++ b/http-walker.c
@@ -1,6 +1,7 @@
#include "cache.h"
#include "repository.h"
#include "commit.h"
+#include "hex.h"
#include "walker.h"
#include "http.h"
#include "list.h"
diff --git a/http.c b/http.c
index c4b6ddef28..86b0745af9 100644
--- a/http.c
+++ b/http.c
@@ -1,5 +1,6 @@
#include "git-compat-util.h"
#include "git-curl-compat.h"
+#include "hex.h"
#include "http.h"
#include "config.h"
#include "pack.h"
diff --git a/line-log.c b/line-log.c
index 4956eae748..1bf89c9acc 100644
--- a/line-log.c
+++ b/line-log.c
@@ -2,6 +2,7 @@
#include "alloc.h"
#include "line-range.h"
#include "cache.h"
+#include "hex.h"
#include "tag.h"
#include "blob.h"
#include "tree.h"
diff --git a/list-objects-filter.c b/list-objects-filter.c
index e40ea9b0a8..5d7b331660 100644
--- a/list-objects-filter.c
+++ b/list-objects-filter.c
@@ -1,6 +1,7 @@
#include "cache.h"
#include "alloc.h"
#include "dir.h"
+#include "hex.h"
#include "tag.h"
#include "commit.h"
#include "tree.h"
diff --git a/list-objects.c b/list-objects.c
index 7528fe1db2..ab5745bbfe 100644
--- a/list-objects.c
+++ b/list-objects.c
@@ -1,6 +1,7 @@
#include "cache.h"
#include "tag.h"
#include "commit.h"
+#include "hex.h"
#include "tree.h"
#include "blob.h"
#include "diff.h"
diff --git a/log-tree.c b/log-tree.c
index 1dd5fcbf7b..ee3dfb6b65 100644
--- a/log-tree.c
+++ b/log-tree.c
@@ -2,6 +2,7 @@
#include "commit-reach.h"
#include "config.h"
#include "diff.h"
+#include "hex.h"
#include "object-store.h"
#include "repository.h"
#include "tmp-objdir.h"
diff --git a/ls-refs.c b/ls-refs.c
index 697d4beb8d..f4c6b9b762 100644
--- a/ls-refs.c
+++ b/ls-refs.c
@@ -1,4 +1,5 @@
#include "cache.h"
+#include "hex.h"
#include "repository.h"
#include "refs.h"
#include "remote.h"
diff --git a/match-trees.c b/match-trees.c
index 49398e599f..c38dcbac7c 100644
--- a/match-trees.c
+++ b/match-trees.c
@@ -1,4 +1,5 @@
#include "cache.h"
+#include "hex.h"
#include "tree.h"
#include "tree-walk.h"
#include "object-store.h"
diff --git a/merge-ort.c b/merge-ort.c
index d1611ca400..4c5be8ed91 100644
--- a/merge-ort.c
+++ b/merge-ort.c
@@ -26,6 +26,7 @@
#include "diff.h"
#include "diffcore.h"
#include "dir.h"
+#include "hex.h"
#include "entry.h"
#include "ll-merge.h"
#include "object-store.h"
diff --git a/merge-recursive.c b/merge-recursive.c
index ae469f8cc8..ee144676b7 100644
--- a/merge-recursive.c
+++ b/merge-recursive.c
@@ -18,6 +18,7 @@
#include "diff.h"
#include "diffcore.h"
#include "dir.h"
+#include "hex.h"
#include "ll-merge.h"
#include "lockfile.h"
#include "object-store.h"
diff --git a/merge.c b/merge.c
index 445b4f19aa..2c8b845684 100644
--- a/merge.c
+++ b/merge.c
@@ -1,6 +1,7 @@
#include "cache.h"
#include "diff.h"
#include "diffcore.h"
+#include "hex.h"
#include "lockfile.h"
#include "commit.h"
#include "run-command.h"
diff --git a/midx.c b/midx.c
index 84d7a53d66..24799bef51 100644
--- a/midx.c
+++ b/midx.c
@@ -3,6 +3,7 @@
#include "config.h"
#include "csum-file.h"
#include "dir.h"
+#include "hex.h"
#include "lockfile.h"
#include "packfile.h"
#include "object-store.h"
diff --git a/negotiator/skipping.c b/negotiator/skipping.c
index 0f5ac48e87..28f8769bd4 100644
--- a/negotiator/skipping.c
+++ b/negotiator/skipping.c
@@ -2,6 +2,7 @@
#include "skipping.h"
#include "../commit.h"
#include "../fetch-negotiator.h"
+#include "../hex.h"
#include "../prio-queue.h"
#include "../refs.h"
#include "../tag.h"
diff --git a/notes-merge.c b/notes-merge.c
index b4cc594a79..5b1a9ff13f 100644
--- a/notes-merge.c
+++ b/notes-merge.c
@@ -5,6 +5,7 @@
#include "repository.h"
#include "diff.h"
#include "diffcore.h"
+#include "hex.h"
#include "xdiff-interface.h"
#include "ll-merge.h"
#include "dir.h"
diff --git a/notes.c b/notes.c
index f2805d51bb..c9e4b8b4a5 100644
--- a/notes.c
+++ b/notes.c
@@ -1,5 +1,6 @@
#include "cache.h"
#include "config.h"
+#include "hex.h"
#include "notes.h"
#include "object-store.h"
#include "blob.h"
diff --git a/object-file.c b/object-file.c
index 18d65220d7..43a39dd8d3 100644
--- a/object-file.c
+++ b/object-file.c
@@ -9,6 +9,7 @@
#include "git-compat-util.h"
#include "alloc.h"
#include "config.h"
+#include "hex.h"
#include "string-list.h"
#include "lockfile.h"
#include "delta.h"
diff --git a/object-name.c b/object-name.c
index 2dd1a0f56e..97bb94d226 100644
--- a/object-name.c
+++ b/object-name.c
@@ -1,5 +1,6 @@
#include "cache.h"
#include "config.h"
+#include "hex.h"
#include "tag.h"
#include "commit.h"
#include "tree.h"
diff --git a/object.c b/object.c
index 344087de4d..609fed1b73 100644
--- a/object.c
+++ b/object.c
@@ -1,4 +1,5 @@
#include "cache.h"
+#include "hex.h"
#include "object.h"
#include "replace-object.h"
#include "object-store.h"
diff --git a/pack-bitmap-write.c b/pack-bitmap-write.c
index 155939e77b..891d9d2772 100644
--- a/pack-bitmap-write.c
+++ b/pack-bitmap-write.c
@@ -1,5 +1,6 @@
#include "git-compat-util.h"
#include "alloc.h"
+#include "hex.h"
#include "object-store.h"
#include "commit.h"
#include "tag.h"
diff --git a/pack-bitmap.c b/pack-bitmap.c
index 5a97834120..a321d6fae8 100644
--- a/pack-bitmap.c
+++ b/pack-bitmap.c
@@ -1,6 +1,7 @@
#include "git-compat-util.h"
#include "alloc.h"
#include "commit.h"
+#include "hex.h"
#include "strbuf.h"
#include "tag.h"
#include "diff.h"
diff --git a/pack-check.c b/pack-check.c
index bfb593ba72..7ed594d667 100644
--- a/pack-check.c
+++ b/pack-check.c
@@ -1,4 +1,5 @@
#include "cache.h"
+#include "hex.h"
#include "repository.h"
#include "pack.h"
#include "pack-revindex.h"
diff --git a/pack-write.c b/pack-write.c
index 3363729748..041e573bc1 100644
--- a/pack-write.c
+++ b/pack-write.c
@@ -1,4 +1,5 @@
#include "cache.h"
+#include "hex.h"
#include "pack.h"
#include "csum-file.h"
#include "remote.h"
diff --git a/packfile.c b/packfile.c
index 3e3063de44..4088735a7d 100644
--- a/packfile.c
+++ b/packfile.c
@@ -1,5 +1,6 @@
#include "git-compat-util.h"
#include "alloc.h"
+#include "hex.h"
#include "list.h"
#include "pack.h"
#include "repository.h"
diff --git a/parallel-checkout.c b/parallel-checkout.c
index decdc8d8a1..2455aa356d 100644
--- a/parallel-checkout.c
+++ b/parallel-checkout.c
@@ -2,6 +2,7 @@
#include "alloc.h"
#include "config.h"
#include "entry.h"
+#include "hex.h"
#include "parallel-checkout.h"
#include "pkt-line.h"
#include "progress.h"
diff --git a/patch-ids.c b/patch-ids.c
index 3153446626..a4473a88fa 100644
--- a/patch-ids.c
+++ b/patch-ids.c
@@ -2,6 +2,7 @@
#include "diff.h"
#include "commit.h"
#include "hash-lookup.h"
+#include "hex.h"
#include "patch-ids.h"
static int patch_id_defined(struct commit *commit)
diff --git a/path.c b/path.c
index 492e17ad12..97561c3b14 100644
--- a/path.c
+++ b/path.c
@@ -2,6 +2,7 @@
* Utilities for paths and pathnames
*/
#include "cache.h"
+#include "hex.h"
#include "repository.h"
#include "strbuf.h"
#include "string-list.h"
diff --git a/pkt-line.c b/pkt-line.c
index ce4e73b683..1ea7f8600e 100644
--- a/pkt-line.c
+++ b/pkt-line.c
@@ -1,5 +1,6 @@
#include "cache.h"
#include "pkt-line.h"
+#include "hex.h"
#include "run-command.h"
char packet_buffer[LARGE_PACKET_MAX];
diff --git a/pretty.c b/pretty.c
index b608084449..2401e3ed36 100644
--- a/pretty.c
+++ b/pretty.c
@@ -2,6 +2,7 @@
#include "alloc.h"
#include "config.h"
#include "commit.h"
+#include "hex.h"
#include "utf8.h"
#include "diff.h"
#include "revision.h"
diff --git a/promisor-remote.c b/promisor-remote.c
index faa7612941..1db566982e 100644
--- a/promisor-remote.c
+++ b/promisor-remote.c
@@ -1,4 +1,5 @@
#include "cache.h"
+#include "hex.h"
#include "object-store.h"
#include "promisor-remote.h"
#include "config.h"
diff --git a/protocol-caps.c b/protocol-caps.c
index bbde91810a..f9bc2a8b90 100644
--- a/protocol-caps.c
+++ b/protocol-caps.c
@@ -1,6 +1,7 @@
#include "git-compat-util.h"
#include "protocol-caps.h"
#include "gettext.h"
+#include "hex.h"
#include "pkt-line.h"
#include "strvec.h"
#include "hash.h"
diff --git a/reachable.c b/reachable.c
index aba63ebeb3..be9d40923d 100644
--- a/reachable.c
+++ b/reachable.c
@@ -1,4 +1,5 @@
#include "cache.h"
+#include "hex.h"
#include "refs.h"
#include "tag.h"
#include "commit.h"
diff --git a/read-cache.c b/read-cache.c
index 3cc8e312dc..1bcf673271 100644
--- a/read-cache.c
+++ b/read-cache.c
@@ -8,6 +8,7 @@
#include "config.h"
#include "diff.h"
#include "diffcore.h"
+#include "hex.h"
#include "tempfile.h"
#include "lockfile.h"
#include "cache-tree.h"
diff --git a/ref-filter.c b/ref-filter.c
index c8230a0858..d862718508 100644
--- a/ref-filter.c
+++ b/ref-filter.c
@@ -1,5 +1,6 @@
#include "git-compat-util.h"
#include "alloc.h"
+#include "hex.h"
#include "parse-options.h"
#include "refs.h"
#include "wildmatch.h"
diff --git a/refs.c b/refs.c
index f90f953551..f22adf6d45 100644
--- a/refs.c
+++ b/refs.c
@@ -6,6 +6,7 @@
#include "alloc.h"
#include "config.h"
#include "hashmap.h"
+#include "hex.h"
#include "lockfile.h"
#include "iterator.h"
#include "refs.h"
diff --git a/refs/debug.c b/refs/debug.c
index ff7766bc63..adc34c836f 100644
--- a/refs/debug.c
+++ b/refs/debug.c
@@ -1,4 +1,5 @@
#include "git-compat-util.h"
+#include "hex.h"
#include "refs-internal.h"
#include "trace.h"
diff --git a/refs/files-backend.c b/refs/files-backend.c
index b89954355d..6f257c7005 100644
--- a/refs/files-backend.c
+++ b/refs/files-backend.c
@@ -1,5 +1,6 @@
#include "../cache.h"
#include "../config.h"
+#include "../hex.h"
#include "../refs.h"
#include "refs-internal.h"
#include "ref-cache.h"
diff --git a/refs/packed-backend.c b/refs/packed-backend.c
index 186dcafcd0..b665d0f7d9 100644
--- a/refs/packed-backend.c
+++ b/refs/packed-backend.c
@@ -1,6 +1,7 @@
#include "../git-compat-util.h"
#include "../alloc.h"
#include "../config.h"
+#include "../hex.h"
#include "../refs.h"
#include "refs-internal.h"
#include "packed-backend.h"
diff --git a/refspec.c b/refspec.c
index ec336ec5e9..28d90911aa 100644
--- a/refspec.c
+++ b/refspec.c
@@ -1,5 +1,6 @@
#include "git-compat-util.h"
#include "alloc.h"
+#include "hex.h"
#include "strvec.h"
#include "refs.h"
#include "refspec.h"
diff --git a/remote-curl.c b/remote-curl.c
index 380ef3fccf..ed7e3a043a 100644
--- a/remote-curl.c
+++ b/remote-curl.c
@@ -1,6 +1,7 @@
#include "git-compat-util.h"
#include "alloc.h"
#include "config.h"
+#include "hex.h"
#include "remote.h"
#include "connect.h"
#include "strbuf.h"
diff --git a/remote.c b/remote.c
index daade49a6f..b04e5da338 100644
--- a/remote.c
+++ b/remote.c
@@ -1,6 +1,7 @@
#include "git-compat-util.h"
#include "alloc.h"
#include "config.h"
+#include "hex.h"
#include "remote.h"
#include "urlmatch.h"
#include "refs.h"
diff --git a/replace-object.c b/replace-object.c
index 320be2522d..0cf056c4fb 100644
--- a/replace-object.c
+++ b/replace-object.c
@@ -1,4 +1,5 @@
#include "cache.h"
+#include "hex.h"
#include "oidmap.h"
#include "object-store.h"
#include "replace-object.h"
diff --git a/rerere.c b/rerere.c
index d4bcb90853..a67abaab07 100644
--- a/rerere.c
+++ b/rerere.c
@@ -1,6 +1,7 @@
#include "git-compat-util.h"
#include "alloc.h"
#include "config.h"
+#include "hex.h"
#include "lockfile.h"
#include "string-list.h"
#include "rerere.h"
diff --git a/reset.c b/reset.c
index 5ded23611f..58b3829ff7 100644
--- a/reset.c
+++ b/reset.c
@@ -1,5 +1,6 @@
#include "git-compat-util.h"
#include "cache-tree.h"
+#include "hex.h"
#include "lockfile.h"
#include "refs.h"
#include "reset.h"
diff --git a/revision.c b/revision.c
index b8f925f088..e356bc4aae 100644
--- a/revision.c
+++ b/revision.c
@@ -1,6 +1,7 @@
#include "git-compat-util.h"
#include "alloc.h"
#include "config.h"
+#include "hex.h"
#include "object-store.h"
#include "tag.h"
#include "blob.h"
diff --git a/send-pack.c b/send-pack.c
index f2e19838c9..954104673f 100644
--- a/send-pack.c
+++ b/send-pack.c
@@ -1,6 +1,7 @@
#include "builtin.h"
#include "config.h"
#include "commit.h"
+#include "hex.h"
#include "refs.h"
#include "object-store.h"
#include "pkt-line.h"
diff --git a/sequencer.c b/sequencer.c
index fcf8740ce1..af1e07fe76 100644
--- a/sequencer.c
+++ b/sequencer.c
@@ -1,6 +1,7 @@
#include "cache.h"
#include "alloc.h"
#include "config.h"
+#include "hex.h"
#include "lockfile.h"
#include "dir.h"
#include "object-store.h"
diff --git a/server-info.c b/server-info.c
index f07daa16f3..4043689202 100644
--- a/server-info.c
+++ b/server-info.c
@@ -1,6 +1,7 @@
#include "git-compat-util.h"
#include "alloc.h"
#include "dir.h"
+#include "hex.h"
#include "repository.h"
#include "refs.h"
#include "object.h"
diff --git a/sha1dc_git.c b/sha1dc_git.c
index 5c300e812e..72709606fd 100644
--- a/sha1dc_git.c
+++ b/sha1dc_git.c
@@ -1,4 +1,5 @@
#include "cache.h"
+#include "hex.h"
#ifdef DC_SHA1_EXTERNAL
/*
diff --git a/shallow.c b/shallow.c
index 7dc73fb898..1cbb05ba0e 100644
--- a/shallow.c
+++ b/shallow.c
@@ -1,5 +1,6 @@
#include "git-compat-util.h"
#include "alloc.h"
+#include "hex.h"
#include "repository.h"
#include "tempfile.h"
#include "lockfile.h"
diff --git a/strbuf.c b/strbuf.c
index bc4c2c09e6..1c57ac6574 100644
--- a/strbuf.c
+++ b/strbuf.c
@@ -1,5 +1,6 @@
#include "git-compat-util.h"
#include "alloc.h"
+#include "hex.h"
#include "refs.h"
#include "string-list.h"
#include "utf8.h"
diff --git a/strvec.c b/strvec.c
index 94d504e380..17d54b6c3b 100644
--- a/strvec.c
+++ b/strvec.c
@@ -1,6 +1,7 @@
#include "git-compat-util.h"
#include "strvec.h"
#include "alloc.h"
+#include "hex.h"
#include "strbuf.h"
const char *empty_strvec[] = { NULL };
diff --git a/submodule-config.c b/submodule-config.c
index bb7c35fc31..89a7bf0a93 100644
--- a/submodule-config.c
+++ b/submodule-config.c
@@ -1,6 +1,7 @@
#include "cache.h"
#include "alloc.h"
#include "dir.h"
+#include "hex.h"
#include "repository.h"
#include "config.h"
#include "submodule-config.h"
diff --git a/submodule.c b/submodule.c
index 340ffad1c2..9d89299772 100644
--- a/submodule.c
+++ b/submodule.c
@@ -7,6 +7,7 @@
#include "dir.h"
#include "diff.h"
#include "commit.h"
+#include "hex.h"
#include "revision.h"
#include "run-command.h"
#include "diffcore.h"
diff --git a/t/helper/test-bloom.c b/t/helper/test-bloom.c
index 6c900ca668..787fd52455 100644
--- a/t/helper/test-bloom.c
+++ b/t/helper/test-bloom.c
@@ -1,5 +1,6 @@
#include "git-compat-util.h"
#include "bloom.h"
+#include "hex.h"
#include "test-tool.h"
#include "commit.h"
diff --git a/t/helper/test-cache-tree.c b/t/helper/test-cache-tree.c
index 9159a17301..615e648e55 100644
--- a/t/helper/test-cache-tree.c
+++ b/t/helper/test-cache-tree.c
@@ -1,6 +1,7 @@
#define USE_THE_INDEX_VARIABLE
#include "test-tool.h"
#include "cache.h"
+#include "hex.h"
#include "tree.h"
#include "cache-tree.h"
#include "parse-options.h"
diff --git a/t/helper/test-dump-cache-tree.c b/t/helper/test-dump-cache-tree.c
index 454f17b1a0..92dfc1aa8c 100644
--- a/t/helper/test-dump-cache-tree.c
+++ b/t/helper/test-dump-cache-tree.c
@@ -1,6 +1,7 @@
#define USE_THE_INDEX_VARIABLE
#include "test-tool.h"
#include "cache.h"
+#include "hex.h"
#include "tree.h"
#include "cache-tree.h"
diff --git a/t/helper/test-dump-split-index.c b/t/helper/test-dump-split-index.c
index 0ea97b8407..813d0a38fa 100644
--- a/t/helper/test-dump-split-index.c
+++ b/t/helper/test-dump-split-index.c
@@ -1,6 +1,7 @@
#define USE_THE_INDEX_VARIABLE
#include "test-tool.h"
#include "cache.h"
+#include "hex.h"
#include "split-index.h"
#include "ewah/ewok.h"
diff --git a/t/helper/test-dump-untracked-cache.c b/t/helper/test-dump-untracked-cache.c
index 6d53683f13..af953fabe8 100644
--- a/t/helper/test-dump-untracked-cache.c
+++ b/t/helper/test-dump-untracked-cache.c
@@ -2,6 +2,7 @@
#include "test-tool.h"
#include "cache.h"
#include "dir.h"
+#include "hex.h"
static int compare_untracked(const void *a_, const void *b_)
{
diff --git a/t/helper/test-fast-rebase.c b/t/helper/test-fast-rebase.c
index efc82dd80c..b1edb92a03 100644
--- a/t/helper/test-fast-rebase.c
+++ b/t/helper/test-fast-rebase.c
@@ -15,6 +15,7 @@
#include "cache-tree.h"
#include "commit.h"
+#include "hex.h"
#include "lockfile.h"
#include "merge-ort.h"
#include "refs.h"
diff --git a/t/helper/test-hash.c b/t/helper/test-hash.c
index 5860dab0ff..016248106a 100644
--- a/t/helper/test-hash.c
+++ b/t/helper/test-hash.c
@@ -1,5 +1,6 @@
#include "test-tool.h"
#include "cache.h"
+#include "hex.h"
int cmd_hash_impl(int ac, const char **av, int algo)
{
diff --git a/t/helper/test-match-trees.c b/t/helper/test-match-trees.c
index 4079fdee06..04bc2563f3 100644
--- a/t/helper/test-match-trees.c
+++ b/t/helper/test-match-trees.c
@@ -1,5 +1,6 @@
#include "test-tool.h"
#include "cache.h"
+#include "hex.h"
#include "tree.h"
int cmd__match_trees(int ac, const char **av)
diff --git a/t/helper/test-oid-array.c b/t/helper/test-oid-array.c
index d1324d086a..0906993ad5 100644
--- a/t/helper/test-oid-array.c
+++ b/t/helper/test-oid-array.c
@@ -1,5 +1,6 @@
#include "test-tool.h"
#include "cache.h"
+#include "hex.h"
#include "oid-array.h"
static int print_oid(const struct object_id *oid, void *data)
diff --git a/t/helper/test-oidmap.c b/t/helper/test-oidmap.c
index 0acf99931e..883d40efd4 100644
--- a/t/helper/test-oidmap.c
+++ b/t/helper/test-oidmap.c
@@ -1,5 +1,6 @@
#include "test-tool.h"
#include "cache.h"
+#include "hex.h"
#include "oidmap.h"
#include "strbuf.h"
diff --git a/t/helper/test-oidtree.c b/t/helper/test-oidtree.c
index d48a409f4e..0b82431a70 100644
--- a/t/helper/test-oidtree.c
+++ b/t/helper/test-oidtree.c
@@ -1,5 +1,6 @@
#include "test-tool.h"
#include "cache.h"
+#include "hex.h"
#include "oidtree.h"
static enum cb_next print_oid(const struct object_id *oid, void *data)
diff --git a/t/helper/test-pack-mtimes.c b/t/helper/test-pack-mtimes.c
index f7b79daf4c..f68b3761b6 100644
--- a/t/helper/test-pack-mtimes.c
+++ b/t/helper/test-pack-mtimes.c
@@ -1,5 +1,6 @@
#include "git-compat-util.h"
#include "test-tool.h"
+#include "hex.h"
#include "strbuf.h"
#include "object-store.h"
#include "packfile.h"
diff --git a/t/helper/test-partial-clone.c b/t/helper/test-partial-clone.c
index 3f102cfddd..da17fd37eb 100644
--- a/t/helper/test-partial-clone.c
+++ b/t/helper/test-partial-clone.c
@@ -1,4 +1,5 @@
#include "cache.h"
+#include "hex.h"
#include "test-tool.h"
#include "repository.h"
#include "object-store.h"
diff --git a/t/helper/test-proc-receive.c b/t/helper/test-proc-receive.c
index a4b305f494..7e12d4f9aa 100644
--- a/t/helper/test-proc-receive.c
+++ b/t/helper/test-proc-receive.c
@@ -1,5 +1,6 @@
#include "cache.h"
#include "connect.h"
+#include "hex.h"
#include "parse-options.h"
#include "pkt-line.h"
#include "sigchain.h"
diff --git a/t/helper/test-reach.c b/t/helper/test-reach.c
index 883d8e20a8..de8f26639d 100644
--- a/t/helper/test-reach.c
+++ b/t/helper/test-reach.c
@@ -3,6 +3,7 @@
#include "commit.h"
#include "commit-reach.h"
#include "config.h"
+#include "hex.h"
#include "parse-options.h"
#include "ref-filter.h"
#include "string-list.h"
diff --git a/t/helper/test-read-midx.c b/t/helper/test-read-midx.c
index 27072ba94d..0a883cdf26 100644
--- a/t/helper/test-read-midx.c
+++ b/t/helper/test-read-midx.c
@@ -1,5 +1,6 @@
#include "test-tool.h"
#include "cache.h"
+#include "hex.h"
#include "midx.h"
#include "repository.h"
#include "object-store.h"
diff --git a/t/helper/test-ref-store.c b/t/helper/test-ref-store.c
index ae8a5648da..1745b088b7 100644
--- a/t/helper/test-ref-store.c
+++ b/t/helper/test-ref-store.c
@@ -1,5 +1,6 @@
#include "test-tool.h"
#include "cache.h"
+#include "hex.h"
#include "refs.h"
#include "worktree.h"
#include "object-store.h"
diff --git a/t/helper/test-repository.c b/t/helper/test-repository.c
index 56f0e3c1be..10a6dfc216 100644
--- a/t/helper/test-repository.c
+++ b/t/helper/test-repository.c
@@ -3,6 +3,7 @@
#include "commit-graph.h"
#include "commit.h"
#include "config.h"
+#include "hex.h"
#include "object-store.h"
#include "object.h"
#include "repository.h"
diff --git a/tag.c b/tag.c
index dfbcd7fcc2..18b718cca6 100644
--- a/tag.c
+++ b/tag.c
@@ -6,6 +6,7 @@
#include "blob.h"
#include "alloc.h"
#include "gpg-interface.h"
+#include "hex.h"
#include "packfile.h"
const char *tag_type = "tag";
diff --git a/trace2/tr2_sid.c b/trace2/tr2_sid.c
index dc6e75ef13..5f1ce6f85c 100644
--- a/trace2/tr2_sid.c
+++ b/trace2/tr2_sid.c
@@ -1,4 +1,5 @@
#include "cache.h"
+#include "hex.h"
#include "trace2/tr2_tbuf.h"
#include "trace2/tr2_sid.h"
diff --git a/transport-helper.c b/transport-helper.c
index 3ea7c2bb5a..82ac63e260 100644
--- a/transport-helper.c
+++ b/transport-helper.c
@@ -4,6 +4,7 @@
#include "run-command.h"
#include "commit.h"
#include "diff.h"
+#include "hex.h"
#include "revision.h"
#include "remote.h"
#include "string-list.h"
diff --git a/transport.c b/transport.c
index ac9e06a6ce..906dbad5a0 100644
--- a/transport.c
+++ b/transport.c
@@ -1,6 +1,7 @@
#include "git-compat-util.h"
#include "alloc.h"
#include "config.h"
+#include "hex.h"
#include "transport.h"
#include "hook.h"
#include "pkt-line.h"
diff --git a/tree-walk.c b/tree-walk.c
index d22f3fe5b0..0e2f5ceb71 100644
--- a/tree-walk.c
+++ b/tree-walk.c
@@ -2,6 +2,7 @@
#include "tree-walk.h"
#include "alloc.h"
#include "dir.h"
+#include "hex.h"
#include "object-store.h"
#include "tree.h"
#include "pathspec.h"
diff --git a/tree.c b/tree.c
index 410e3b477e..76a6534f67 100644
--- a/tree.c
+++ b/tree.c
@@ -1,5 +1,6 @@
#include "cache.h"
#include "cache-tree.h"
+#include "hex.h"
#include "tree.h"
#include "object-store.h"
#include "blob.h"
diff --git a/unpack-trees.c b/unpack-trees.c
index 3d05e45a27..9c1f2a14b4 100644
--- a/unpack-trees.c
+++ b/unpack-trees.c
@@ -3,6 +3,7 @@
#include "repository.h"
#include "config.h"
#include "dir.h"
+#include "hex.h"
#include "tree.h"
#include "tree-walk.h"
#include "cache-tree.h"
diff --git a/upload-pack.c b/upload-pack.c
index 551f22ffa5..fa4bb61e4f 100644
--- a/upload-pack.c
+++ b/upload-pack.c
@@ -1,5 +1,6 @@
#include "cache.h"
#include "config.h"
+#include "hex.h"
#include "refs.h"
#include "pkt-line.h"
#include "sideband.h"
diff --git a/url.c b/url.c
index e04bd60b6b..bf318c0520 100644
--- a/url.c
+++ b/url.c
@@ -1,4 +1,5 @@
#include "cache.h"
+#include "hex.h"
#include "url.h"
int is_urlschemechar(int first_flag, int ch)
diff --git a/urlmatch.c b/urlmatch.c
index 620a648efc..2965cbe774 100644
--- a/urlmatch.c
+++ b/urlmatch.c
@@ -1,4 +1,5 @@
#include "cache.h"
+#include "hex.h"
#include "urlmatch.h"
#define URL_ALPHA "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"
diff --git a/walker.c b/walker.c
index 99d0e0eae0..c046936378 100644
--- a/walker.c
+++ b/walker.c
@@ -1,4 +1,5 @@
#include "cache.h"
+#include "hex.h"
#include "walker.h"
#include "repository.h"
#include "object-store.h"
diff --git a/wt-status.c b/wt-status.c
index 3162241a57..90525bd26f 100644
--- a/wt-status.c
+++ b/wt-status.c
@@ -4,6 +4,7 @@
#include "dir.h"
#include "commit.h"
#include "diff.h"
+#include "hex.h"
#include "revision.h"
#include "diffcore.h"
#include "quote.h"
diff --git a/xdiff-interface.c b/xdiff-interface.c
index e87950de32..5baf6ceb94 100644
--- a/xdiff-interface.c
+++ b/xdiff-interface.c
@@ -1,5 +1,6 @@
#include "cache.h"
#include "config.h"
+#include "hex.h"
#include "object-store.h"
#include "xdiff-interface.h"
#include "xdiff/xtypes.h"