Show 22 quoted lines
> On Mon, May 11, 2026 at 02:29:56PM +0200, Patrick Steinhardt wrote:
>
>> @@ -1946,8 +1946,10 @@ int prepare_auto_maintenance(struct repository *r, int quiet,
>> {
>> int enabled, auto_detach;
>>
>> - if (!repo_config_get_bool(r, "maintenance.auto", &enabled) &&
>> - !enabled)
>> + if (repo_config_get_bool(r, "maintenance.auto", &enabled) &&
>> + repo_config_get_bool(r, "gc.auto", &enabled))
>> + enabled = 1;
>> + if (!enabled)
>> return 0;
>
> gc.auto isn't a bool; it's the count of loose objects after which to run
> maintenance. So "0" works in both contexts, but will we complain if
> gc.auto is set to 100? I think maybe not, because we fall back to
> git_parse_int(), but it feels kind of fragile.
>
> The gc code uses repo_config_get_int() here.
>
> -Peff