diff.h: remove unnecessary include of oidset.h
This also made it clear that several .c files depended upon various things that oidset included, but had omitted the direct #include for those headers. Add those now. Signed-off-by: Elijah Newren <newren@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Elijah Newren committed
May 16, 2023 at 06:34 UTC
df6e8744966bfa66ff289f58372bb060fdc6a124
30 files changed
+35
-1
add-interactive.c
+2
index 40f88c0205..add9a1ad43 100644
--- a/add-interactive.c
+++ b/add-interactive.c
@@ -4,9 +4,11 @@
#include "config.h"
#include "diffcore.h"
#include "gettext.h"
+#include "hash.h"
#include "hex.h"
#include "preload-index.h"
#include "read-cache-ll.h"
+#include "repository.h"
#include "revision.h"
#include "refs.h"
#include "string-list.h"
add-patch.c
+1
index 875b96e227..53e3248295 100644
--- a/add-patch.c
+++ b/add-patch.c
@@ -7,6 +7,7 @@
#include "gettext.h"
#include "object-name.h"
#include "read-cache-ll.h"
+#include "repository.h"
#include "strbuf.h"
#include "run-command.h"
#include "strvec.h"
blame.h
+1
index b60d1d81e3..31ddc85f19 100644
--- a/blame.h
+++ b/blame.h
@@ -2,6 +2,7 @@
#define BLAME_H
#include "commit.h"
+#include "oidset.h"
#include "xdiff-interface.h"
#include "revision.h"
#include "prio-queue.h"
builtin/add.c
+1
index 4318311448..e3ca3e4edb 100644
--- a/builtin/add.c
+++ b/builtin/add.c
@@ -21,6 +21,7 @@
#include "diff.h"
#include "diffcore.h"
#include "read-cache.h"
+#include "repository.h"
#include "revision.h"
#include "bulk-checkin.h"
#include "strvec.h"
builtin/diff-files.c
+1
index a4a2ab76c7..50330b8dd2 100644
--- a/builtin/diff-files.c
+++ b/builtin/diff-files.c
@@ -9,6 +9,7 @@
#include "diff-merges.h"
#include "commit.h"
#include "preload-index.h"
+#include "repository.h"
#include "revision.h"
#include "submodule.h"
builtin/diff-index.c
+1
index 1ab8f8b6dc..a8b2c0a4b9 100644
--- a/builtin/diff-index.c
+++ b/builtin/diff-index.c
@@ -4,6 +4,7 @@
#include "diff-merges.h"
#include "commit.h"
#include "preload-index.h"
+#include "repository.h"
#include "revision.h"
#include "setup.h"
#include "submodule.h"
builtin/merge-ours.c
+1
index c2e519301e..932924e5d0 100644
--- a/builtin/merge-ours.c
+++ b/builtin/merge-ours.c
@@ -10,6 +10,7 @@
#include "git-compat-util.h"
#include "builtin.h"
#include "diff.h"
+#include "repository.h"
static const char builtin_merge_ours_usage[] =
"git merge-ours <base>... -- HEAD <remote>...";
builtin/patch-id.c
+1
index 27952f1a6f..b7118b290b 100644
--- a/builtin/patch-id.c
+++ b/builtin/patch-id.c
@@ -2,6 +2,7 @@
#include "config.h"
#include "diff.h"
#include "gettext.h"
+#include "hash.h"
#include "hex.h"
#include "parse-options.h"
builtin/range-diff.c
+1
index 8610390d7c..e455a4795c 100644
--- a/builtin/range-diff.c
+++ b/builtin/range-diff.c
@@ -4,6 +4,7 @@
#include "parse-options.h"
#include "range-diff.h"
#include "config.h"
+#include "repository.h"
#include "revision.h"
static const char * const builtin_range_diff_usage[] = {
builtin/reflog.c
+1
index a1fa0c855f..fc21774880 100644
--- a/builtin/reflog.c
+++ b/builtin/reflog.c
@@ -1,6 +1,7 @@
#include "builtin.h"
#include "config.h"
#include "gettext.h"
+#include "repository.h"
#include "revision.h"
#include "reachable.h"
#include "worktree.h"
builtin/reset.c
+1
index f947c449d1..dad2117c97 100644
--- a/builtin/reset.c
+++ b/builtin/reset.c
@@ -13,6 +13,7 @@
#include "config.h"
#include "environment.h"
#include "gettext.h"
+#include "hash.h"
#include "hex.h"
#include "lockfile.h"
#include "tag.h"
builtin/rev-parse.c
+1
index 6eb5965bee..4a219ea93b 100644
--- a/builtin/rev-parse.c
+++ b/builtin/rev-parse.c
@@ -11,6 +11,7 @@
#include "commit.h"
#include "environment.h"
#include "gettext.h"
+#include "hash.h"
#include "hex.h"
#include "refs.h"
#include "quote.h"
builtin/revert.c
+1
index 0240ec8593..f6f07d9b53 100644
--- a/builtin/revert.c
+++ b/builtin/revert.c
@@ -5,6 +5,7 @@
#include "parse-options.h"
#include "diff.h"
#include "gettext.h"
+#include "repository.h"
#include "revision.h"
#include "rerere.h"
#include "dir.h"
builtin/shortlog.c
+1
index 99be9dc417..1307ed2b88 100644
--- a/builtin/shortlog.c
+++ b/builtin/shortlog.c
@@ -5,6 +5,7 @@
#include "environment.h"
#include "gettext.h"
#include "string-list.h"
+#include "repository.h"
#include "revision.h"
#include "utf8.h"
#include "mailmap.h"
builtin/stash.c
+1
index d3d5bb95e2..84e83e0627 100644
--- a/builtin/stash.c
+++ b/builtin/stash.c
@@ -4,6 +4,7 @@
#include "config.h"
#include "environment.h"
#include "gettext.h"
+#include "hash.h"
#include "hex.h"
#include "object-name.h"
#include "parse-options.h"
diff-lib.c
+2
index f3aa7f93c7..cad18099ab 100644
--- a/diff-lib.c
+++ b/diff-lib.c
@@ -7,6 +7,7 @@
#include "diff.h"
#include "diffcore.h"
#include "gettext.h"
+#include "hash.h"
#include "hex.h"
#include "object-name.h"
#include "read-cache.h"
@@ -14,6 +15,7 @@
#include "cache-tree.h"
#include "unpack-trees.h"
#include "refs.h"
+#include "repository.h"
#include "submodule.h"
#include "symlinks.h"
#include "trace.h"
diff.h
+3
-1
index 5a0c91bb48..2102df329a 100644
--- a/diff.h
+++ b/diff.h
@@ -4,10 +4,12 @@
#ifndef DIFF_H
#define DIFF_H
+#include "hash-ll.h"
#include "pathspec.h"
-#include "oidset.h"
#include "strbuf.h"
+struct oidset;
+
/**
* The diff API is for programs that compare two sets of files (e.g. two trees,
* one tree and the index) and present the found difference in various ways.
diffcore-break.c
+1
index 4909dc088e..f57ece2757 100644
--- a/diffcore-break.c
+++ b/diffcore-break.c
@@ -4,6 +4,7 @@
#include "git-compat-util.h"
#include "diff.h"
#include "diffcore.h"
+#include "hash.h"
#include "object.h"
#include "promisor-remote.h"
diffcore-pickaxe.c
+1
index 13c98a7b5e..b195fa4eb3 100644
--- a/diffcore-pickaxe.c
+++ b/diffcore-pickaxe.c
@@ -7,6 +7,7 @@
#include "diffcore.h"
#include "xdiff-interface.h"
#include "kwset.h"
+#include "oidset.h"
#include "pretty.h"
#include "quote.h"
line-log.c
+1
index 6a7ac312a4..2eff914bf3 100644
--- a/line-log.c
+++ b/line-log.c
@@ -8,6 +8,7 @@
#include "diff.h"
#include "commit.h"
#include "decorate.h"
+#include "repository.h"
#include "revision.h"
#include "xdiff-interface.h"
#include "strbuf.h"
merge.c
+2
index 83bcba6943..b60925459c 100644
--- a/merge.c
+++ b/merge.c
@@ -2,10 +2,12 @@
#include "diff.h"
#include "diffcore.h"
#include "gettext.h"
+#include "hash.h"
#include "hex.h"
#include "lockfile.h"
#include "merge.h"
#include "commit.h"
+#include "repository.h"
#include "run-command.h"
#include "resolve-undo.h"
#include "tree.h"
patch-ids.c
+1
index 19af7bee98..c3e1a0dd21 100644
--- a/patch-ids.c
+++ b/patch-ids.c
@@ -1,6 +1,7 @@
#include "git-compat-util.h"
#include "diff.h"
#include "commit.h"
+#include "hash.h"
#include "hash-lookup.h"
#include "hex.h"
#include "patch-ids.h"
pretty.c
+1
index 0bb938021b..2cf2cbbd03 100644
--- a/pretty.c
+++ b/pretty.c
@@ -4,6 +4,7 @@
#include "commit.h"
#include "environment.h"
#include "gettext.h"
+#include "hash.h"
#include "hex.h"
#include "utf8.h"
#include "diff.h"
range-diff.c
+1
index 6a704e6f47..2e86063491 100644
--- a/range-diff.c
+++ b/range-diff.c
@@ -13,6 +13,7 @@
#include "commit.h"
#include "pager.h"
#include "pretty.h"
+#include "repository.h"
#include "userdiff.h"
#include "apply.h"
#include "revision.h"
reflog-walk.c
+1
index 4ba1a10c82..d337e64431 100644
--- a/reflog-walk.c
+++ b/reflog-walk.c
@@ -3,6 +3,7 @@
#include "commit.h"
#include "refs.h"
#include "diff.h"
+#include "repository.h"
#include "revision.h"
#include "string-list.h"
#include "reflog-walk.h"
t/helper/test-fast-rebase.c
+1
index 62c5b5d704..cac20a72b3 100644
--- a/t/helper/test-fast-rebase.c
+++ b/t/helper/test-fast-rebase.c
@@ -16,6 +16,7 @@
#include "commit.h"
#include "environment.h"
#include "gettext.h"
+#include "hash.h"
#include "hex.h"
#include "lockfile.h"
#include "merge-ort.h"
t/helper/test-revision-walking.c
+1
index 0c62b9de18..f346951bc2 100644
--- a/t/helper/test-revision-walking.c
+++ b/t/helper/test-revision-walking.c
@@ -11,6 +11,7 @@
#include "test-tool.h"
#include "commit.h"
#include "diff.h"
+#include "repository.h"
#include "revision.h"
#include "setup.h"
transport-helper.c
+1
index 6b816940dc..5c0bc6a896 100644
--- a/transport-helper.c
+++ b/transport-helper.c
@@ -8,6 +8,7 @@
#include "gettext.h"
#include "hex.h"
#include "object-name.h"
+#include "repository.h"
#include "revision.h"
#include "remote.h"
#include "string-list.h"
tree-diff.c
+1
index 20bb15f38d..966946848a 100644
--- a/tree-diff.c
+++ b/tree-diff.c
@@ -4,6 +4,7 @@
#include "git-compat-util.h"
#include "diff.h"
#include "diffcore.h"
+#include "hash.h"
#include "tree.h"
#include "tree-walk.h"
wt-status.c
+1
index 7ada6b305f..bcd0ef8044 100644
--- a/wt-status.c
+++ b/wt-status.c
@@ -7,6 +7,7 @@
#include "diff.h"
#include "environment.h"
#include "gettext.h"
+#include "hash.h"
#include "hex.h"
#include "object-name.h"
#include "path.h"