Re: [PATCH 05/16] alloc.h: move ALLOC_GROW() functions from cache.h
- From
Derrick Stolee <derrickstolee@github.com>
- Date
- Feb 23, 2023, 14:06 UTC
- Message-ID
- <536338b8-2189-04f3-7ed6-dbe640c73c9f@github.com>
- In-Reply-To
- <ec6f2518b9dddbaaaf101b0f87a2db377fef3c6b.1677139522.git.gitgitgadget@gmail.com>
On 2/23/2023 3:05 AM, Elijah Newren via GitGitGadget wrote:
> From: Elijah Newren <newren@gmail.com> > > This allows us to replace includes of cache.h with includes > of the much smaller alloc.h in many places.
Show 9 quoted lines
> diff --git a/add-patch.c b/add-patch.c > index a86a92e1646..7fe6b66d866 100644 > --- a/add-patch.c > +++ b/add-patch.c > @@ -1,5 +1,7 @@ > #include "cache.h" > #include "add-interactive.h" > +#include "alloc.h" > +#include "gettext.h"
I see here that you are not dropping cache.h, but are also adding gettext.h, too? Did you mean to replace cache.h with git-compat-util.h here, or will I see that change happen in a future patch?
Show 9 quoted lines
> diff --git a/attr.c b/attr.c > index 1053dfcd4b6..657ee52229e 100644 > --- a/attr.c > +++ b/attr.c > @@ -7,6 +7,7 @@ > */ > > #include "cache.h" > +#include "alloc.h"
(Here's another example. Makes it more likely that this is on purpose in preparation for a full swap in the future. I'll stop mentioning this when I see it.)
I also manually verified that the macros are an exact move from cache.h to alloc.h.
Thanks, -Stolee