Re: [PATCH v2 17/22] cache.h: remove unnecessary headers
- From
Ævar Arnfjörð Bjarmason <avarab@gmail.com>
- Date
- May 1, 2023, 16:49 UTC
- Message-ID
- <230501.86r0s0hu7a.gmgdl@evledraar.gmail.com>
- In-Reply-To
- <b459b60de89750d0226c7c4f1c7c28de249b475b.1682194652.git.gitgitgadget@gmail.com>
On Sat, Apr 22 2023, Elijah Newren via GitGitGadget wrote:
Show 45 quoted lines
> From: Elijah Newren <newren@gmail.com>
>
> Signed-off-by: Elijah Newren <newren@gmail.com>
> ---
> cache.h | 2 --
> compat/fsmonitor/fsm-ipc-darwin.c | 1 +
> compat/fsmonitor/fsm-listen-darwin.c | 1 +
> 3 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/cache.h b/cache.h
> index 591c67b0595..bdedb87e83b 100644
> --- a/cache.h
> +++ b/cache.h
> @@ -4,8 +4,6 @@
> #include "git-compat-util.h"
> #include "strbuf.h"
> #include "hashmap.h"
> -#include "gettext.h"
> -#include "string-list.h"
> #include "pathspec.h"
> #include "object.h"
> #include "statinfo.h"
> diff --git a/compat/fsmonitor/fsm-ipc-darwin.c b/compat/fsmonitor/fsm-ipc-darwin.c
> index e62f093cc19..bc68dca0cae 100644
> --- a/compat/fsmonitor/fsm-ipc-darwin.c
> +++ b/compat/fsmonitor/fsm-ipc-darwin.c
> @@ -1,5 +1,6 @@
> #include "cache.h"
> #include "config.h"
> +#include "gettext.h"
> #include "hex.h"
> #include "repository.h"
> #include "strbuf.h"
> diff --git a/compat/fsmonitor/fsm-listen-darwin.c b/compat/fsmonitor/fsm-listen-darwin.c
> index 5eb6402ab82..18c0e3913dc 100644
> --- a/compat/fsmonitor/fsm-listen-darwin.c
> +++ b/compat/fsmonitor/fsm-listen-darwin.c
> @@ -29,6 +29,7 @@
> #include "fsmonitor--daemon.h"
> #include "fsmonitor-path-utils.h"
> #include "gettext.h"
> +#include "string-list.h"
>
> struct fsm_listen_data
> {If I rebase this topic to make this the first commit everything compiles, i.e. nothing here relies on what came before.
Given the extensive earlier moves I think it would be better to first remove unnecessary includes from cache.h, before starting to split it up.