git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [BUG] diff algorithm selection issue

From
Junio C Hamano <gitster@pobox.com>
Date
May 26, 2020, 16:23 UTC
Message-ID
<xmqqd06qoec9.fsf@gitster.c.googlers.com>
In-Reply-To
<xmqqh7w2oexd.fsf@gitster.c.googlers.com>
Junio C Hamano <gitster@pobox.com> writes:
> the issue, but anyway, somebody seems to be OR'ing in diff_algorithm
> to xdl_opts field after we see --diff-algorithm=minimal and replaced
> XDF_DIFF_ALGORITHM_MASK bits in xdl_opts field in this function, ...

Well, I am not so sure about that diagnosis, actually. I should probably have taken a bit of caffeine before writing my e-mails.

There is no patch needed. --- I simply had misread your report.
> When the config has diff.algorithm=patience set, "git diff --minimal" seems to
> be ignored, and does not give the same output as "git diff --diff-algorithm=minimal",
> but really the same as "git diff --diff-algorithm=patience".
As I wrote, that is absolutely the intended behaviour.  

When patience and other algorithm learns how to trade cycles off with output size, --minimal may make a difference, but unlike "--diff-algorithm=minimal" that forces Myers algorithm, the "--minimal" option should not change the underlying algorithm.

Thanks.
Previous: Junio C HamanoNext: ydirson@free.fr
Message 3 of 6 in “[BUG] diff algorithm selection issue”
  1. ydirson@free.frMay 26, 2020
  2. Junio C HamanoMay 26, 2020
  3. Junio C HamanoMay 26, 2020
  4. ydirson@free.frMay 26, 2020
  5. ydirson@free.frMay 26, 2020
  6. Junio C HamanoMay 26, 2020

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.