git/list[1] front-page[2] threads[3] people[4] search[5] about
wed 2026-10-07 18:03 UTC

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.
Previous: Junio C HamanoNext: Antonin Delpeuch via GitGitGadget
Message 20 of 32 in “blame: make diff algorithm configurable”
  1. blame: make diff algorithm configurableAntonin Delpeuch via GitGitGadget, Oct 20, 2025
  2. Junio C HamanoOct 20, 2025
  3. Antonin DelpeuchOct 22, 2025
  4. Junio C HamanoOct 22, 2025
  5. Phillip WoodOct 23, 2025
  6. blame: make diff algorithm configurableAntonin Delpeuch via GitGitGadget, Oct 28, 2025
  7. Junio C HamanoOct 28, 2025
  8. Antonin DelpeuchOct 28, 2025
  9. blame: make diff algorithm configurableAntonin Delpeuch via GitGitGadget, Oct 28, 2025
  10. Phillip WoodOct 29, 2025
  11. Junio C HamanoOct 29, 2025
  12. Antonin DelpeuchOct 30, 2025
  13. Phillip WoodOct 30, 2025
  14. 0/2 blame: make diff algorithm configurableAntonin Delpeuch via GitGitGadget, Nov 1, 2025
  15. 1/2 xdiff: add 'minimal' to XDF_DIFF_ALGORITHM_MASKAntonin Delpeuch via GitGitGadget, Nov 1, 2025
  16. 2/2 blame: make diff algorithm configurableAntonin Delpeuch via GitGitGadget, Nov 1, 2025
  17. Phillip WoodNov 3, 2025
  18. Phillip WoodNov 3, 2025
  19. Junio C HamanoNov 3, 2025
  20. Junio C HamanoNov 6, 2025
  21. 0/2 blame: make diff algorithm configurableAntonin Delpeuch via GitGitGadget, Nov 6, 2025
  22. 1/2 xdiff: add 'minimal' to XDF_DIFF_ALGORITHM_MASKAntonin Delpeuch via GitGitGadget, Nov 6, 2025
  23. 2/2 blame: make diff algorithm configurableAntonin Delpeuch via GitGitGadget, Nov 6, 2025
  24. Phillip WoodNov 7, 2025
  25. Junio C HamanoNov 7, 2025
  26. Junio C HamanoNov 7, 2025
  27. Junio C HamanoNov 17, 2025
  28. 0/2 blame: make diff algorithm configurableAntonin Delpeuch via GitGitGadget, Nov 17, 2025
  29. 1/2 xdiff: add 'minimal' to XDF_DIFF_ALGORITHM_MASKAntonin Delpeuch via GitGitGadget, Nov 17, 2025
  30. 2/2 blame: make diff algorithm configurableAntonin Delpeuch via GitGitGadget, Nov 17, 2025
  31. Phillip WoodNov 17, 2025
  32. Junio C HamanoNov 17, 2025

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.