From: Junio C Hamano <gitster@pobox.com>
To: Stefan Beller <sbeller@google.com>
Cc: Jonathan Nieder <jrnieder@gmail.com>, git <git@vger.kernel.org>
Subject: Re: [PATCH] Documentation/diff-options: explain different diff algorithms
Date: Tue, 24 Jul 2018 13:06:44 -0700 [thread overview]
Message-ID: <xmqq4lgoxusr.fsf@gitster-ct.c.googlers.com> (raw)
In-Reply-To: <CAGZ79kap9TovN2ia4pEgz33dh=9y89cVYZWnB_1e6iHpR=kDOQ@mail.gmail.com> (Stefan Beller's message of "Tue, 24 Jul 2018 10:38:03 -0700")
Stefan Beller <sbeller@google.com> writes:
> On Mon, Jul 23, 2018 at 9:41 PM Jonathan Nieder <jrnieder@gmail.com> wrote:
>>
>> Hi,
>>
>> Stefan Beller wrote:
>>
>> > As a user I wondered what the diff algorithms are about. Offer at least
>> > a basic explanation on the differences of the diff algorithms.
>>
>> Interesting. Let's see.
>>
>> [...]
>> > --- a/Documentation/diff-options.txt
>> > +++ b/Documentation/diff-options.txt
>> > @@ -94,16 +94,34 @@ diff" algorithm internally.
>> > Choose a diff algorithm. The variants are as follows:
>> > +
>> > --
>> > -`default`, `myers`;;
>> > - The basic greedy diff algorithm. Currently, this is the default.
>> > `minimal`;;
>> > + A diff as produced by the basic greedy algorithm described in
>>
>> Why this reordering?
>
> because Myers (below) is constructed from minimal + heuristic.
> ...
> So the "minimal" algorithm is the basic myers algorithm,
> and the "myers" algorithm is the extended version (extended
> with a heuristic to be fast in corner cases, still producing good
> enough diffs).
I am not sure that is a good reason for the target readers of this
document to move the default from the beginning to somewhere in the
middle. For a textbook that explains different algorithms and gives
overview of how they work, that order may be appropriate, though.
>> > - Spend extra time to make sure the smallest possible diff is
>> > - produced.
>> > +`default`, `myers`;;
>> > + The same algorithm as `minimal`, extended with a heuristic to
>> > + reduce extensive searches. Currently, this is the default.
>>
>> Amusing --- this means that the Myers diff is spelled as "minimal"
>> instead of "myers".
Yeah, I had the same thought---for an end-user documentation update,
this change and the reordering does not feel like an improvement.
>> I wonder if these details (about all the algorithms) should go in a
>> separate Diff Algorithms section and this section could focus on
>> what use cases warrant using each, referring to that section for
>> details. What do you think?
Good suggestion.
next prev parent reply other threads:[~2018-07-24 20:06 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-07-24 0:36 [PATCH] Documentation/diff-options: explain different diff algorithms Stefan Beller
2018-07-24 4:40 ` Jonathan Nieder
2018-07-24 17:38 ` Stefan Beller
2018-07-24 20:06 ` Junio C Hamano [this message]
2018-08-06 22:25 ` Stefan Beller
2018-08-06 23:18 ` Jonathan Nieder
2018-08-07 15:56 ` Junio C Hamano
2018-08-09 19:26 ` Stefan Beller
2018-08-10 22:18 ` Stefan Beller
2018-08-09 19:51 ` Stefan Beller
2018-08-10 0:10 ` [PATCH 0/2] Getting data on different diff algorithms WAS: " Stefan Beller
2018-08-10 0:10 ` [PATCH 1/2] WIP: range-diff: take extra arguments for different diffs Stefan Beller
2018-08-10 0:10 ` [PATCH 2/2] WIP range-diff: print some statistics about the range Stefan Beller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=xmqq4lgoxusr.fsf@gitster-ct.c.googlers.com \
--to=gitster@pobox.com \
--cc=git@vger.kernel.org \
--cc=jrnieder@gmail.com \
--cc=sbeller@google.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).