From: Junio C Hamano Date: Tue, 9 May 2023 23:45:45 +0000 (-0700) Subject: Merge branch 'en/header-split-cache-h-part-2' X-Git-Tag: v2.41.0-rc0~40 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=ccd12a3d6cc62f51b746654ae56e26d92f89ba92;p=thirdparty%2Fgit.git Merge branch 'en/header-split-cache-h-part-2' More header clean-up. * en/header-split-cache-h-part-2: (22 commits) reftable: ensure git-compat-util.h is the first (indirect) include diff.h: reduce unnecessary includes object-store.h: reduce unnecessary includes commit.h: reduce unnecessary includes fsmonitor: reduce includes of cache.h cache.h: remove unnecessary headers treewide: remove cache.h inclusion due to previous changes cache,tree: move basic name compare functions from read-cache to tree cache,tree: move cmp_cache_name_compare from tree.[ch] to read-cache.c hash-ll.h: split out of hash.h to remove dependency on repository.h tree-diff.c: move S_DIFFTREE_IFXMIN_NEQ define from cache.h dir.h: move DTYPE defines from cache.h versioncmp.h: move declarations for versioncmp.c functions from cache.h ws.h: move declarations for ws.c functions from cache.h match-trees.h: move declarations for match-trees.c functions from cache.h pkt-line.h: move declarations for pkt-line.c functions from cache.h base85.h: move declarations for base85.c functions from cache.h copy.h: move declarations for copy.c functions from cache.h server-info.h: move declarations for server-info.c functions from cache.h packfile.h: move pack_window and pack_entry from cache.h ... --- ccd12a3d6cc62f51b746654ae56e26d92f89ba92 diff --cc builtin/write-tree.c index 32e302a813,6085f64d10..84b83318c9 --- a/builtin/write-tree.c +++ b/builtin/write-tree.c @@@ -13,6 -13,6 +13,7 @@@ #include "tree.h" #include "cache-tree.h" #include "parse-options.h" ++#include "repository.h" static const char * const write_tree_usage[] = { N_("git write-tree [--missing-ok] [--prefix=/]"), diff --cc t/helper/test-dump-fsmonitor.c index 7c6f50158b,6dc4958337..9a098a25cb --- a/t/helper/test-dump-fsmonitor.c +++ b/t/helper/test-dump-fsmonitor.c @@@ -1,8 -1,9 +1,9 @@@ #include "test-tool.h" #include "cache.h" + #include "repository.h" #include "setup.h" -int cmd__dump_fsmonitor(int ac, const char **av) +int cmd__dump_fsmonitor(int ac UNUSED, const char **av UNUSED) { struct index_state *istate = the_repository->index; int i; diff --cc t/helper/test-example-decorate.c index 2cf302ffcb,43707486dd..2ed910adaa --- a/t/helper/test-example-decorate.c +++ b/t/helper/test-example-decorate.c @@@ -2,8 -2,9 +2,9 @@@ #include "git-compat-util.h" #include "object.h" #include "decorate.h" + #include "repository.h" -int cmd__example_decorate(int argc, const char **argv) +int cmd__example_decorate(int argc UNUSED, const char **argv UNUSED) { struct decoration n; struct object_id one_oid = { {1} }; diff --cc t/helper/test-oidmap.c index d9931544a8,bba4099f65..bd30244a54 --- a/t/helper/test-oidmap.c +++ b/t/helper/test-oidmap.c @@@ -2,9 -2,9 +2,10 @@@ #include "hex.h" #include "object-name.h" #include "oidmap.h" + #include "repository.h" #include "setup.h" #include "strbuf.h" +#include "string-list.h" /* key is an oid and value is a name (could be a refname for example) */ struct test_entry { diff --cc t/helper/test-oidtree.c index 5b98f2f70a,dc509fb806..c7a1d4c642 --- a/t/helper/test-oidtree.c +++ b/t/helper/test-oidtree.c @@@ -2,9 -2,9 +2,9 @@@ #include "hex.h" #include "oidtree.h" #include "setup.h" + #include "strbuf.h" -static enum cb_next print_oid(const struct object_id *oid, void *data) +static enum cb_next print_oid(const struct object_id *oid, void *data UNUSED) { puts(oid_to_hex(oid)); return CB_CONTINUE;