Re: [PATCH 2/7] builtin/gc: refactor to read config into structure
- From
James Liu <james@jamesliu.io>
- Date
- Aug 15, 2024, 05:24 UTC
- Message-ID
- <D3G8GP38BNG8.26Y1ZLIUPTWJB@jamesliu.io>
- In-Reply-To
- <ff6aa9d7ba0bd67d3682ecb44c024a6d59a7decd.1723533091.git.ps@pks.im>
On Tue Aug 13, 2024 at 5:17 PM AEST, Patrick Steinhardt wrote:
Show 19 quoted lines
> @@ -206,7 +224,7 @@ struct maintenance_run_opts {
> enum schedule_priority schedule;
> };
>
> -static int pack_refs_condition(void)
> +static int pack_refs_condition(UNUSED struct gc_config *cfg)
> {
> /*
> * The auto-repacking logic for refs is handled by the ref backends and
> @@ -216,7 +234,8 @@ static int pack_refs_condition(void)
> return 1;
> }
>
> -static int maintenance_task_pack_refs(MAYBE_UNUSED struct maintenance_run_opts *opts)
> +static int maintenance_task_pack_refs(MAYBE_UNUSED struct maintenance_run_opts *opts,
> + UNUSED struct gc_config *cfg)
> {
> struct child_process cmd = CHILD_PROCESS_INIT;
> Are we defining *cfg as an unused argument to conform to the `maintenance_task_fn` signature?