Re: [PATCH v8 07/10] config: make `delta_base_cache_limit` a non-global variable
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Nov 26, 2024, 07:25 UTC
- Message-ID
- <xmqqfrnezcbh.fsf@gitster.g>
- In-Reply-To
- <d1b6e8801bb7edc9ce55bb50a5d46f9779906ad1.1732269840.git.karthik.188@gmail.com>
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?
> 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.