From 49fd5511945977882ef2cd8b3c00ed25ac208512 Mon Sep 17 00:00:00 2001 From: SZEDER Gábor Date: Sun, 19 Mar 2023 17:27:11 +0100 Subject: treewide: include parse-options.h in source files MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The builtins 'ls-remote', 'pack-objects', 'receive-pack', 'reflog' and 'send-pack' use parse_options(), but their source files don't directly include 'parse-options.h'. Furthermore, the source files 'diagnose.c', 'list-objects-filter-options.c', 'remote.c' and 'send-pack.c' define option parsing callback functions, while 'revision.c' defines an option parsing helper function, and thus need access to various fields in 'struct option' and 'struct parse_opt_ctx_t', but they don't directly include 'parse-options.h' either. They all can still be built, of course, because they include one of the header files that does include 'parse-options.h' (though unnecessarily, see the next commit). Add those missing includes to these files, as our general rule is that "a C file must directly include the header files that declare the functions and the types it uses". Signed-off-by: SZEDER Gábor Reviewed-by: Elijah Newren Signed-off-by: Junio C Hamano --- diagnose.c | 1 + 1 file changed, 1 insertion(+) (limited to 'diagnose.c') diff --git a/diagnose.c b/diagnose.c index 8f26569896..b7a29612da 100644 --- a/diagnose.c +++ b/diagnose.c @@ -7,6 +7,7 @@ #include "strvec.h" #include "object-store.h" #include "packfile.h" +#include "parse-options.h" struct archive_dir { const char *path; -- cgit 1.2.3-korg