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 --- diff.c | 1 + 1 file changed, 1 insertion(+) (limited to 'diff.c') diff --git a/diff.c b/diff.c index 00d47281a1..00746f2f86 100644 --- a/diff.c +++ b/diff.c @@ -4,6 +4,7 @@ #include "cache.h" #include "alloc.h" #include "config.h" +#include "gettext.h" #include "tempfile.h" #include "quote.h" #include "diff.h" -- cgit v1.2.3 From 0b027f6ca79cafbc14f36ff1741fc7378282f295 Mon Sep 17 00:00:00 2001 From: Elijah Newren Date: Tue, 21 Mar 2023 06:25:58 +0000 Subject: abspath.h: move absolute path functions from cache.h This is another step towards letting us remove the include of cache.h in strbuf.c. It does mean that we also need to add includes of abspath.h in a number of C files. Signed-off-by: Elijah Newren Signed-off-by: Junio C Hamano --- diff.c | 1 + 1 file changed, 1 insertion(+) (limited to 'diff.c') diff --git a/diff.c b/diff.c index 00746f2f86..1b0be99c06 100644 --- a/diff.c +++ b/diff.c @@ -2,6 +2,7 @@ * Copyright (C) 2005 Junio C Hamano */ #include "cache.h" +#include "abspath.h" #include "alloc.h" #include "config.h" #include "gettext.h" -- cgit v1.2.3 From d5ebb50dcb2bae27cf9f233088f7258f21e72be7 Mon Sep 17 00:00:00 2001 From: Elijah Newren Date: Tue, 21 Mar 2023 06:26:01 +0000 Subject: wrapper.h: move declarations for wrapper.c functions from cache.h Signed-off-by: Elijah Newren Signed-off-by: Junio C Hamano --- diff.c | 1 + 1 file changed, 1 insertion(+) (limited to 'diff.c') diff --git a/diff.c b/diff.c index 1b0be99c06..1b0b24c21c 100644 --- a/diff.c +++ b/diff.c @@ -33,6 +33,7 @@ #include "promisor-remote.h" #include "dir.h" #include "strmap.h" +#include "wrapper.h" #ifdef NO_FAST_WORKING_DIRECTORY #define FAST_WORKING_DIRECTORY 0 -- cgit v1.2.3 From 32a8f510614312cc8b81bbc6a982d08ab7562ab4 Mon Sep 17 00:00:00 2001 From: Elijah Newren Date: Tue, 21 Mar 2023 06:26:03 +0000 Subject: environment.h: move declarations for environment.c functions from cache.h Signed-off-by: Elijah Newren Signed-off-by: Junio C Hamano --- diff.c | 1 + 1 file changed, 1 insertion(+) (limited to 'diff.c') diff --git a/diff.c b/diff.c index 1b0b24c21c..dcf1a94094 100644 --- a/diff.c +++ b/diff.c @@ -5,6 +5,7 @@ #include "abspath.h" #include "alloc.h" #include "config.h" +#include "environment.h" #include "gettext.h" #include "tempfile.h" #include "quote.h" -- cgit v1.2.3 From e38da487cc50ce4b5b48085eebcab8268c541579 Mon Sep 17 00:00:00 2001 From: Elijah Newren Date: Tue, 21 Mar 2023 06:26:05 +0000 Subject: setup.h: move declarations for setup.c functions from cache.h Signed-off-by: Elijah Newren Signed-off-by: Junio C Hamano --- diff.c | 1 + 1 file changed, 1 insertion(+) (limited to 'diff.c') diff --git a/diff.c b/diff.c index dcf1a94094..b858e59c5a 100644 --- a/diff.c +++ b/diff.c @@ -33,6 +33,7 @@ #include "help.h" #include "promisor-remote.h" #include "dir.h" +#include "setup.h" #include "strmap.h" #include "wrapper.h" -- cgit v1.2.3