Re: [PATCH v4 2/2] blame: make diff algorithm configurable
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Nov 6, 2025, 20:29 UTC
- Message-ID
- <xmqqo6pehpl6.fsf@gitster.g>
- In-Reply-To
- <xmqqh5vbum6k.fsf@gitster.g>
Junio C Hamano <gitster@pobox.com> writes:
Show 18 quoted lines
> Phillip Wood <phillip.wood123@gmail.com> 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.