Message ID | b459b60de89750d0226c7c4f1c7c28de249b475b.1682194652.git.gitgitgadget@gmail.com (mailing list archive) |
---|---|
State | Accepted |
Commit | 4c98cb8e355d51520cb56ef8bdcbe9f23c55a114 |
Headers | show |
Series | Header cleanups (more splitting of cache.h and simplifying a few other deps) | expand |
On Sat, Apr 22 2023, Elijah Newren via GitGitGadget wrote: > 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.
On Mon, May 1, 2023 at 9:50 AM Ævar Arnfjörð Bjarmason <avarab@gmail.com> wrote: > > On Sat, Apr 22 2023, Elijah Newren via GitGitGadget wrote: > > > 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. Interesting. I originally had this patch earlier as you proposed, but in writing the cover letter found it made it simpler to explain the high level overview by moving it. It's really nice to be able to say, "this series continues to focus on splitting declarations from cache.h to separate headers...and then makes other cleanups I found while doing that", which naturally suggested the opposite ordering from what I originally had.
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 {