Re: [PATCH v2 19/22] commit.h: reduce unnecessary includes
- From
Elijah Newren <newren@gmail.com>
- Date
- May 2, 2023, 01:53 UTC
- Message-ID
- <CABPp-BGOAd=CY2vrd-GjFzk-889MukKX1nbwwi5+9F+UC0aWuw@mail.gmail.com>
- In-Reply-To
- <230501.86mt2ohtt0.gmgdl@evledraar.gmail.com>
On Mon, May 1, 2023 at 9:59 AM Ævar Arnfjörð Bjarmason <avarab@gmail.com> wrote:
Show 19 quoted lines
> > On Sat, Apr 22 2023, Elijah Newren via GitGitGadget wrote: > > > From: Elijah Newren <newren@gmail.com> > > Re earlier comments: If I rebase to make this the first commit > everything compiles, i.e. nothing here relied on the earlier split-offs > of cache.h into other headers. > > You need to make a choice of whether to first split out cache.h, and > then do commits like these, or the other way around. > > I'm not sure whether it's better to do it the other way around. If you > do that it's clear e.g. add-interactive.c's implicit dependency on > tree.h via commit.h has nothing to do with what would be the subsequent > split-up of cache.h. > > Or maybe this is fine. I'm just trying to get some picture of what > depends on what in this series...
Yes, there is some freedom about the ordering of patches, and I had to make a choice.
I found a number of the cleanups like this one for commit.h interspersed with the other changes, but I intentionally grouped them at the end to get a good high level overview, namely:
(A) Continue splitting declarations from cache.h to separate headers (B) Do other header cleanups found during that work
I could have reversed the order, but since the series was motivated and organized around (A), it made more sense to me to put those patches first.
Besides, the last time I moved a few miscellaneous cleanup patches to the front of the series, someone else responded thinking the purpose and motivation was about those first few patches[1], so I wanted to avoid a repeat of that problem. ;-)
[1] https://lore.kernel.org/git/CABPp-BFZBWTG1VF6N8teVMYxoUdOeciKGwPq1g-G1K5--My5uQ@mail.gmail.com/