From a64acf7298e87740a596123d2b39fefe623fd46f Mon Sep 17 00:00:00 2001 From: Elijah Newren Date: Tue, 21 Mar 2023 06:26:02 +0000 Subject: treewide: remove unnecessary includes of cache.h The last several commits were geared at replacing the include of cache.h in strbuf.c with an include of git-compat-util.h. Unfortunately, I had to drop a patch moving some functions from cache.h to object-name.h, due to excessive conflicts with other in-flight topics. However, even without that patch, the series of patches so far allows us to modify a number of C files to replace an include of cache.h with git-compat-util.h. Do that to reduce our dependencies. (If we could have kept our object-name.h patch in this series, it would have also let us reduce the includes in checkout.c and fmt-merge-msg.c in addition to strbuf.c). Just to ensure that nothing else was bringing in cache.h, all of the affected files have been checked to ensure that gcc -E -I. $SOURCE_FILE | grep '"cache.h"' found no hits and that make DEVELOPER=1 ${OBJECT_FILE_FOR_SOURCE_FILE} successfully compiles without warnings. Signed-off-by: Elijah Newren Signed-off-by: Junio C Hamano --- usage.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'usage.c') diff --git a/usage.c b/usage.c index b53c99dbe5..46d99f8bd4 100644 --- a/usage.c +++ b/usage.c @@ -3,8 +3,9 @@ * * Copyright (C) Linus Torvalds, 2005 */ -#include "cache.h" +#include "git-compat-util.h" #include "gettext.h" +#include "trace2.h" #include "wrapper.h" static void vreportf(const char *prefix, const char *err, va_list params) -- cgit v1.2.3