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

Re: [PATCH] Documentation/diff-options: explain different diff algorithms

From
Stefan Beller <sbeller@google.com>
Date
Aug 9, 2018, 19:26 UTC
Message-ID
<CAGZ79kZR_gj00JORH3WB_T+_mgtQm5PGt6+DSMFUbJM+C4FxVw@mail.gmail.com>
In-Reply-To
<xmqq600mmaqn.fsf@gitster-ct.c.googlers.com>
On Tue, Aug 7, 2018 at 8:56 AM Junio C Hamano <gitster@pobox.com> wrote:
Show 11 quoted lines
>
> Jonathan Nieder <jrnieder@gmail.com> writes:
>
> > Both don't seem quite right, since they have an extra space before the
> > period.  The git-diff(1) seems especially not quite right --- does it
> > intend to say something like "See the DIFF ALGORITHMS section for more
> > discussion"?
>
> Good suggestion and doing so would nicely allow side-stepping the
> space before the dot issue, i.e. "See the DIFF ALGO section (in
> git-diff(1)) for more discussion".   I like it.
Me, too.
Show 8 quoted lines
> >> +`Histogram`
> >> +
> >> +This algorithm finds the longest common substring and recursively
> >> +diffs the content before and after the longest common substring.
>
> As a first-time reader, I felt that it is a bit uneven that there is
> no attribution for only this item, unlike the description for Myers
> and Patience.

Yeah. That is because I spent too much time thinking how this algo is flawed (in its design as the comments in the initial commit in JGit indicate that design error when reading closely) when I was trying to understand it deeply.

Maybe I should emphasize the trade off for performance gain more as Shawn really cared about performance. After all it offers the best performance in *many* common cases, but has a "long tail" of really unfortunate results, too.

Previous: Junio C HamanoNext: Stefan Beller
Message 8 of 13 in “Documentation/diff-options: explain different diff algorithms”
  1. Documentation/diff-options: explain different diff algorithmsStefan Beller, Jul 24, 2018
  2. Jonathan NiederJul 24, 2018
  3. Stefan BellerJul 24, 2018
  4. Junio C HamanoJul 24, 2018
  5. Documentation/diff-options: explain different diff algorithmsStefan Beller, Aug 6, 2018
  6. Jonathan NiederAug 6, 2018
  7. Junio C HamanoAug 7, 2018
  8. Stefan BellerAug 9, 2018
  9. Documentation/diff-options: explain different diff algorithmsStefan Beller, Aug 10, 2018
  10. Stefan BellerAug 9, 2018
  11. 0/2 Getting data on different diff algorithms WAS: Documentation/diff-options: explain different diff algorithmsStefan Beller, Aug 10, 2018
  12. 1/2 WIP: range-diff: take extra arguments for different diffs.Stefan Beller, Aug 10, 2018
  13. 2/2 WIP range-diff: print some statistics about the rangeStefan Beller, Aug 10, 2018

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.