From f394e093df10f1867d9bb2180b3789ee61124aed Mon Sep 17 00:00:00 2001 From: Elijah Newren Date: Tue, 21 Mar 2023 06:25:54 +0000 Subject: treewide: be explicit about dependence on gettext.h Dozens of files made use of gettext functions, without explicitly including gettext.h. This made it more difficult to find which files could remove a dependence on cache.h. Make C files explicitly include gettext.h if they are using it. However, while compat/fsmonitor/fsm-ipc-darwin.c should also gain an include of gettext.h, it was left out to avoid conflicting with an in-flight topic. Signed-off-by: Elijah Newren Signed-off-by: Junio C Hamano --- connected.c | 1 + 1 file changed, 1 insertion(+) (limited to 'connected.c') diff --git a/connected.c b/connected.c index 39cb1e1074..a4c0aece75 100644 --- a/connected.c +++ b/connected.c @@ -1,4 +1,5 @@ #include "cache.h" +#include "gettext.h" #include "hex.h" #include "object-store.h" #include "run-command.h" -- cgit v1.2.3 From 4f6728d52d5dc79ce522e92171f984455c04b963 Mon Sep 17 00:00:00 2001 From: Elijah Newren Date: Tue, 21 Mar 2023 06:25:56 +0000 Subject: treewide: remove unnecessary cache.h inclusion from several sources A number of files were apparently including cache.h solely to get gettext.h. By making those files explicitly include gettext.h, we can already drop the include of cache.h in these files. On top of that, there were some files using cache.h that didn't need to for any reason. Remove these unnecessary includes. Signed-off-by: Elijah Newren Signed-off-by: Junio C Hamano --- connected.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'connected.c') diff --git a/connected.c b/connected.c index a4c0aece75..669bc4e8d6 100644 --- a/connected.c +++ b/connected.c @@ -1,4 +1,4 @@ -#include "cache.h" +#include "git-compat-util.h" #include "gettext.h" #include "hex.h" #include "object-store.h" -- cgit v1.2.3