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
@@ -4,9 +4,11 @@
4 #include "config.h"
5 #include "diffcore.h"
6 #include "gettext.h"
7 +#include "hash.h"
8 #include "hex.h"
9 #include "preload-index.h"
10 #include "read-cache-ll.h"
11 +#include "repository.h"
12 #include "revision.h"
13 #include "refs.h"
14 #include "string-list.h"
add-patch.c
+1
@@ -7,6 +7,7 @@
7 #include "gettext.h"
8 #include "object-name.h"
9 #include "read-cache-ll.h"
10 +#include "repository.h"
11 #include "strbuf.h"
12 #include "run-command.h"
13 #include "strvec.h"
blame.h
+1
@@ -2,6 +2,7 @@
2 #define BLAME_H
3
4 #include "commit.h"
5 +#include "oidset.h"
6 #include "xdiff-interface.h"
7 #include "revision.h"
8 #include "prio-queue.h"
builtin/add.c
+1
@@ -21,6 +21,7 @@
21 #include "diff.h"
22 #include "diffcore.h"
23 #include "read-cache.h"
24 +#include "repository.h"
25 #include "revision.h"
26 #include "bulk-checkin.h"
27 #include "strvec.h"
builtin/diff-files.c
+1
@@ -9,6 +9,7 @@
9 #include "diff-merges.h"
10 #include "commit.h"
11 #include "preload-index.h"
12 +#include "repository.h"
13 #include "revision.h"
14 #include "submodule.h"
15
builtin/diff-index.c
+1
@@ -4,6 +4,7 @@
4 #include "diff-merges.h"
5 #include "commit.h"
6 #include "preload-index.h"
7 +#include "repository.h"
8 #include "revision.h"
9 #include "setup.h"
10 #include "submodule.h"
builtin/merge-ours.c
+1
@@ -10,6 +10,7 @@
10 #include "git-compat-util.h"
11 #include "builtin.h"
12 #include "diff.h"
13 +#include "repository.h"
14
15 static const char builtin_merge_ours_usage[] =
16 "git merge-ours <base>... -- HEAD <remote>...";
builtin/patch-id.c
+1
@@ -2,6 +2,7 @@
2 #include "config.h"
3 #include "diff.h"
4 #include "gettext.h"
5 +#include "hash.h"
6 #include "hex.h"
7 #include "parse-options.h"
8
builtin/range-diff.c
+1
@@ -4,6 +4,7 @@
4 #include "parse-options.h"
5 #include "range-diff.h"
6 #include "config.h"
7 +#include "repository.h"
8 #include "revision.h"
9
10 static const char * const builtin_range_diff_usage[] = {
builtin/reflog.c
+1
@@ -1,6 +1,7 @@
1 #include "builtin.h"
2 #include "config.h"
3 #include "gettext.h"
4 +#include "repository.h"
5 #include "revision.h"
6 #include "reachable.h"
7 #include "worktree.h"
builtin/reset.c
+1
@@ -13,6 +13,7 @@
13 #include "config.h"
14 #include "environment.h"
15 #include "gettext.h"
16 +#include "hash.h"
17 #include "hex.h"
18 #include "lockfile.h"
19 #include "tag.h"
builtin/rev-parse.c
+1
@@ -11,6 +11,7 @@
11 #include "commit.h"
12 #include "environment.h"
13 #include "gettext.h"
14 +#include "hash.h"
15 #include "hex.h"
16 #include "refs.h"
17 #include "quote.h"
builtin/revert.c
+1
@@ -5,6 +5,7 @@
5 #include "parse-options.h"
6 #include "diff.h"
7 #include "gettext.h"
8 +#include "repository.h"
9 #include "revision.h"
10 #include "rerere.h"
11 #include "dir.h"
builtin/shortlog.c
+1
@@ -5,6 +5,7 @@
5 #include "environment.h"
6 #include "gettext.h"
7 #include "string-list.h"
8 +#include "repository.h"
9 #include "revision.h"
10 #include "utf8.h"
11 #include "mailmap.h"
builtin/stash.c
+1
@@ -4,6 +4,7 @@
4 #include "config.h"
5 #include "environment.h"
6 #include "gettext.h"
7 +#include "hash.h"
8 #include "hex.h"
9 #include "object-name.h"
10 #include "parse-options.h"
diff-lib.c
+2
@@ -7,6 +7,7 @@
7 #include "diff.h"
8 #include "diffcore.h"
9 #include "gettext.h"
10 +#include "hash.h"
11 #include "hex.h"
12 #include "object-name.h"
13 #include "read-cache.h"
@@ -14,6 +15,7 @@
15 #include "cache-tree.h"
16 #include "unpack-trees.h"
17 #include "refs.h"
18 +#include "repository.h"
19 #include "submodule.h"
20 #include "symlinks.h"
21 #include "trace.h"
diff.h
+3 -1
@@ -4,10 +4,12 @@
4 #ifndef DIFF_H
5 #define DIFF_H
6
7 +#include "hash-ll.h"
8 #include "pathspec.h"
8 -#include "oidset.h"
9 #include "strbuf.h"
10
11 +struct oidset;
12 +
13 /**
14 * The diff API is for programs that compare two sets of files (e.g. two trees,
15 * one tree and the index) and present the found difference in various ways.
diffcore-break.c
+1
@@ -4,6 +4,7 @@
4 #include "git-compat-util.h"
5 #include "diff.h"
6 #include "diffcore.h"
7 +#include "hash.h"
8 #include "object.h"
9 #include "promisor-remote.h"
10
diffcore-pickaxe.c
+1
@@ -7,6 +7,7 @@
7 #include "diffcore.h"
8 #include "xdiff-interface.h"
9 #include "kwset.h"
10 +#include "oidset.h"
11 #include "pretty.h"
12 #include "quote.h"
13
line-log.c
+1
@@ -8,6 +8,7 @@
8 #include "diff.h"
9 #include "commit.h"
10 #include "decorate.h"
11 +#include "repository.h"
12 #include "revision.h"
13 #include "xdiff-interface.h"
14 #include "strbuf.h"
merge.c
+2
@@ -2,10 +2,12 @@
2 #include "diff.h"
3 #include "diffcore.h"
4 #include "gettext.h"
5 +#include "hash.h"
6 #include "hex.h"
7 #include "lockfile.h"
8 #include "merge.h"
9 #include "commit.h"
10 +#include "repository.h"
11 #include "run-command.h"
12 #include "resolve-undo.h"
13 #include "tree.h"
patch-ids.c
+1
@@ -1,6 +1,7 @@
1 #include "git-compat-util.h"
2 #include "diff.h"
3 #include "commit.h"
4 +#include "hash.h"
5 #include "hash-lookup.h"
6 #include "hex.h"
7 #include "patch-ids.h"
pretty.c
+1
@@ -4,6 +4,7 @@
4 #include "commit.h"
5 #include "environment.h"
6 #include "gettext.h"
7 +#include "hash.h"
8 #include "hex.h"
9 #include "utf8.h"
10 #include "diff.h"
range-diff.c
+1
@@ -13,6 +13,7 @@
13 #include "commit.h"
14 #include "pager.h"
15 #include "pretty.h"
16 +#include "repository.h"
17 #include "userdiff.h"
18 #include "apply.h"
19 #include "revision.h"
reflog-walk.c
+1
@@ -3,6 +3,7 @@
3 #include "commit.h"
4 #include "refs.h"
5 #include "diff.h"
6 +#include "repository.h"
7 #include "revision.h"
8 #include "string-list.h"
9 #include "reflog-walk.h"
t/helper/test-fast-rebase.c
+1
@@ -16,6 +16,7 @@
16 #include "commit.h"
17 #include "environment.h"
18 #include "gettext.h"
19 +#include "hash.h"
20 #include "hex.h"
21 #include "lockfile.h"
22 #include "merge-ort.h"
t/helper/test-revision-walking.c
+1
@@ -11,6 +11,7 @@
11 #include "test-tool.h"
12 #include "commit.h"
13 #include "diff.h"
14 +#include "repository.h"
15 #include "revision.h"
16 #include "setup.h"
17
transport-helper.c
+1
@@ -8,6 +8,7 @@
8 #include "gettext.h"
9 #include "hex.h"
10 #include "object-name.h"
11 +#include "repository.h"
12 #include "revision.h"
13 #include "remote.h"
14 #include "string-list.h"
tree-diff.c
+1
@@ -4,6 +4,7 @@
4 #include "git-compat-util.h"
5 #include "diff.h"
6 #include "diffcore.h"
7 +#include "hash.h"
8 #include "tree.h"
9 #include "tree-walk.h"
10
wt-status.c
+1
@@ -7,6 +7,7 @@
7 #include "diff.h"
8 #include "environment.h"
9 #include "gettext.h"
10 +#include "hash.h"
11 #include "hex.h"
12 #include "object-name.h"
13 #include "path.h"