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

Re: Can I convince the diff algorithm to behave better?

From
JTJonathan Tan <jonathantanmy@google.com>
Date
Mar 3, 2021, 23:45 UTC
Message-ID
<20210303234530.3122368-1-jonathantanmy@google.com>
In-Reply-To
<CA+cU71=FfReSG411Feo=vmkw4MdK4KDgokP1jH6uwOkC_0AbYA@mail.gmail.com>
> I know that git includes four diff algorithms; in my testing patience
> or histogram exacerbated the problem; and none of them improved upon
> it.  If anyone has suggestions I'd be curious to know if there's
> anything that could be done...

In your particular case, I can't think of anything, but in general, if one of the lines weren't repeated, you might be able to use the --anchored option.

Previous: Thomas BraunNext: Christian Couder
Message 3 of 4 in “Can I convince the diff algorithm to behave better?”
  1. Tom RitterMar 3, 2021
  2. Thomas BraunMar 3, 2021
  3. Jonathan TanMar 3, 2021
  4. Christian CouderMar 4, 2021

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.