Subject: Re: [PATCH 05/16] alloc.h: move ALLOC_GROW() functions from cache.h

From: Derrick Stolee <[email-masked]>
Date: Thu, 23 Feb 2023 09:06:06 -0500

On 2/23/2023 3:05 AM, Elijah Newren via GitGitGadget wrote:
> From: Elijah Newren <[email-masked]>
> 
> This allows us to replace includes of cache.h with includes
> of the much smaller alloc.h in many places.

> 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?

> 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