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 --- builtin/difftool.c | 1 + 1 file changed, 1 insertion(+) (limited to 'builtin/difftool.c') diff --git a/builtin/difftool.c b/builtin/difftool.c index 01681d0fb8..f7380dd1cc 100644 --- a/builtin/difftool.c +++ b/builtin/difftool.c @@ -17,6 +17,7 @@ #include "builtin.h" #include "run-command.h" #include "exec-cmd.h" +#include "gettext.h" #include "hex.h" #include "parse-options.h" #include "strvec.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 --- builtin/difftool.c | 1 + 1 file changed, 1 insertion(+) (limited to 'builtin/difftool.c') diff --git a/builtin/difftool.c b/builtin/difftool.c index f7380dd1cc..ed06db1208 100644 --- a/builtin/difftool.c +++ b/builtin/difftool.c @@ -13,6 +13,7 @@ */ #define USE_THE_INDEX_VARIABLE #include "cache.h" +#include "abspath.h" #include "config.h" #include "builtin.h" #include "run-command.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 --- builtin/difftool.c | 1 + 1 file changed, 1 insertion(+) (limited to 'builtin/difftool.c') diff --git a/builtin/difftool.c b/builtin/difftool.c index ed06db1208..59465c39f1 100644 --- a/builtin/difftool.c +++ b/builtin/difftool.c @@ -27,6 +27,7 @@ #include "object-store.h" #include "dir.h" #include "entry.h" +#include "wrapper.h" static int trust_exit_code; -- 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 --- builtin/difftool.c | 1 + 1 file changed, 1 insertion(+) (limited to 'builtin/difftool.c') diff --git a/builtin/difftool.c b/builtin/difftool.c index 59465c39f1..3613de6389 100644 --- a/builtin/difftool.c +++ b/builtin/difftool.c @@ -17,6 +17,7 @@ #include "config.h" #include "builtin.h" #include "run-command.h" +#include "environment.h" #include "exec-cmd.h" #include "gettext.h" #include "hex.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 --- builtin/difftool.c | 1 + 1 file changed, 1 insertion(+) (limited to 'builtin/difftool.c') diff --git a/builtin/difftool.c b/builtin/difftool.c index 3613de6389..176437d6da 100644 --- a/builtin/difftool.c +++ b/builtin/difftool.c @@ -28,6 +28,7 @@ #include "object-store.h" #include "dir.h" #include "entry.h" +#include "setup.h" #include "wrapper.h" static int trust_exit_code; -- cgit v1.2.3