Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [jgit-dev] HistogramDiff now live on

On Wed, Oct 13, 2010 at 10:04 AM, Shawn Pearce <spearce@xxxxxxxxxxx> wrote:
> On Wed, Oct 13, 2010 at 9:10 AM, Chris Aniszczyk <caniszczyk@xxxxxxxxx> wrote:
>> On Tue, Oct 12, 2010 at 7:21 PM, Shawn Pearce <spearce@xxxxxxxxxxx> wrote:
>>> I just upgraded Gerrit to use HistogramDiff for the line-level
>>> differences.  Its still using MyersDiff for the intraline differences,
>>> because those are character based and HistogramDiff can't get good low
>>> occurrence matches on those.
>> Hrmmm... not sure if this is related but hitting an issue looking at a diff...
>> 1),1739
>> 2) click 'Side-by-Side' for org.eclipse.jgit/pom.xml
>> 3) Application Error everytime :(
> Quite likely.  I'll try to debug it this morning.

Its a bug in HistogramDiff.  A blank line that was inserted isn't
being considered as part of the insert hunk, which means Gerrit gets
out of sync as its iterating through the lines of each side.  It comes
up needing 1 more common context line, which doesn't exist.

I think I understand how to write the unit test for this case (because
we clearly aren't testing for it now!), but I don't yet understand why
it breaks.


Back to the top