Subject: Re: [PATCH 1/2] rebase: support non-interactive autosquash

From: Junio C Hamano <[email-masked]>
Date: Sat, 04 Nov 2023 10:19:17 +0900

Andy Koppe <[email-masked]> writes:

>  rebase.autoSquash::
> -	If set to true enable `--autosquash` option by default.
> +	When set to 'interactive' or 'true', enable the `--autosquash` option
> +	for interactive rebase. When set to 'always', enable it for
> +	non-interactive rebase as well. Defaults to 'false'.

I think a better and more extensible way to coax the new feature
into the configuration system is to arrange it more like so:

    false	  - synonym for "".
    true	  - synonym for "interactive".
    anything else - comman separated list of rebase methods, e.g.,
		    "interactive,noninteractive"

		    possible rebase method names might include other
		    stuff like "apply" or "merge", but I haven't
		    thought it through, so take this part with a
		    grain of salt.

That way, the Boolean versions can be considered historical spelling
of a more general system where you can exactly tell when autosquash
takes place.  When we add to a new variant on top of 'interactive'
and 'non-interactive' variants the current rebase has, we do not
know if it makes sense to allow it to also handle autosquash without
knowing how that new variant's behavior appears to the end user, so
'always' that blindly enables autosquash for any unforseen future
variants of 'rebase' is probably not what you want.