From b73ecb48114926d063d7ab96943bafcc0ae913b6 Mon Sep 17 00:00:00 2001 From: Elijah Newren Date: Fri, 24 Feb 2023 00:09:26 +0000 Subject: hex.h: move some hex-related declarations from cache.h hex.c contains code for hex-related functions, but for some reason these functions were declared in the catch-all cache.h. Move the function declarations into a hex.h header instead. This also allows us to remove includes of cache.h from a few C files. For now, we make cache.h include hex.h, so that it is easier to review the direct changes being made by this patch. In the next patch, we will remove that, and add the necessary direct '#include "hex.h"' in the hundreds of C files that need it. Note that reviewing the header changes in this commit might be simplified via git log --no-walk -p --color-moved $COMMIT -- '*.h'` In particular, it highlights the simple movement of code in .h files rather nicely. Signed-off-by: Elijah Newren Signed-off-by: Junio C Hamano --- mailinfo.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'mailinfo.c') diff --git a/mailinfo.c b/mailinfo.c index 833d28612f..9f1495ddcf 100644 --- a/mailinfo.c +++ b/mailinfo.c @@ -1,5 +1,7 @@ -#include "cache.h" +#include "git-compat-util.h" #include "config.h" +#include "gettext.h" +#include "hex.h" #include "utf8.h" #include "strbuf.h" #include "mailinfo.h" -- cgit v1.2.3