Subject: Re: [PATCH v4 2/2] blame: make diff algorithm configurable

From: Junio C Hamano <[email-masked]>
Date: Thu, 06 Nov 2025 12:29:41 -0800

Junio C Hamano <[email-masked]> writes:

> Phillip Wood <[email-masked]> writes:
>
>> One thing I'd not thought about before was the interaction between 
>> "--no-minimal" and "--diff-algorithm" The code above makes 
>> "--no-minimal" behave like "diff-algorithm=myers" which is consistent 
>> with the current behavior where the only options for the diff algorithm 
>> are "minimal" or "myers". An alternative would be for "--no-minimal" to 
>> just clear XDF_NEED_MINIMAL and behave like a no-op if it is given after 
>> "--diff-algorithm=patience" or "--diff-algorithm=histogram". I don't 
>> really have a strong preference either way.
>
> Good observation.
>
> In the longer term, I think we would be better off if we treated
> "minimal" just like "histogram" and "patience", in that
> ...
> other algorithms from the usual repertoire, the option "no-minimal"
> no longer makes sense.

Just to avoid confusion, the idea above to deprecate and kill
"--no-minimal" is totally outside of this topic to teach "git blame"
the "--diff-algorithm=<algo>" command line option.

I think in the shorter term I think it is OK for the implementation
to do whatever it happens to do when given "--no-minimal", and as
you observed, it is fine to behave like "--diff-algorithm=myers".
I also like your idea to hide --minimal with the OPT_HIDDEN bit.

Thanks.