Subject: Re: [PATCH v2 4/4] scalar reconfigure: add --no-maintenance option

From: Junio C Hamano <[email-masked]>
Date: Tue, 06 May 2025 15:16:47 -0700

Derrick Stolee <[email-masked]> writes:

> What do you think about something of the form --maintenance=<option>
> where <option> is one of these:
>
>  * "enable" (default) runs 'git maintenance start'
>  * "disable" runs 'git maintenance unregister'
>  * "keep" does not mess with maintenance config.

I think it makes superb sense.  

Certainly much less ambiguous than "--[no-]maintenance" given that
we need to handle "reconfigure".  Without the need to deal with
"reconfigure", it certainly is attractive if we can treat it as a
simple Boolean, though.

It is also tempting to just initialize the internal variable to -1
and keep using OPT_BOOL() though.  Then after config and command
line parsing is done, clone and register would turn -1 the user did
not touch into 1 (i.e. enable is default for these two operations),
while reconfigure treats -1 as "leave it as-is".  It would make it
very cumbersome if we ever change our mind and give a default other
than "leave it as-is" to "reconfigure", but other than that minor
downside, it may be easier to use from end-user's point of view.

I have no strong opinion between the two.

Thanks.