Re: [PATCH v8 07/10] config: make `delta_base_cache_limit` a non-global variable
Junio C Hamano <gitster@pobox.com> writes:
Show 13 quoted lines
> Karthik Nayak <karthik.188@gmail.com> writes:
>
>> In `gc.c` add it to the `gc_config` struct and also the constructor
>> function. The gc functions currently do not have direct access to a
>> repository struct.
>
> We should remember to remove this member from gc_config when we pass
> the repository through the callchain. As a built-in, cmd_gc()
> should already be receiving the repository as its parameter, so it
> may not have to wait for a long time before we are ready to do so.
>
> Perhaps have a comment next to the member's definition to remind us?
>
Yeah, that seems like a good idea.
Show 11 quoted lines
>> These changes are made to remove the usage of `delta_base_cache_limit`
>> as a global variable in `packfile.c`. This brings us one step closer to
>> removing the `USE_THE_REPOSITORY_VARIABLE` definition in `packfile.c`
>> which we complete in the next patch.
>
> OK.
>
> IIUC, Taylor's comment to avoid repeated calls to configuration
> layer to obtain delta_base_cache_limit, aside from typofixes, was
> the only thing remaining for this topic? If so, everything is
> looking really good.
Thanks, will send a new version with the comment inlined.