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.