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

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

From
Junio C Hamano <gitster@pobox.com>
Date
Aug 7, 2018, 15:56 UTC
Message-ID
<xmqq600mmaqn.fsf@gitster-ct.c.googlers.com>
In-Reply-To
<20180806231843.GA4117@aiede.svl.corp.google.com>
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.

Show 27 quoted lines
> [...]
>> --- a/Documentation/git-diff.txt
>> +++ b/Documentation/git-diff.txt
>> @@ -119,6 +119,40 @@ include::diff-options.txt[]
>>  
>>  include::diff-format.txt[]
>>  
>> +DIFF ALGORITHMS
>> +---------------
>
> Please add some introductory words about what the headings refer to.
>
>> +`Myers`
>> +
>> +A diff as produced by the basic greedy algorithm described in
>> +link:http://www.xmailserver.org/diff2.pdf[An O(ND) Difference Algorithm and its Variations].
>> +...
>> +
>> +`Patience`
>> +
>> +This algorithm by Bram Cohen matches the longest common subsequence
>> +...
> [...]
>> +`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.

Previous: Jonathan NiederNext: Stefan Beller
Message 7 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.