bmwill / diffy

Tools for finding and manipulating differences between files
Apache License 2.0
75 stars 22 forks source link

Support for the histogram diff algorithm #32

Open wetneb opened 3 months ago

wetneb commented 3 months ago

In Git, the default diff algorithm used when merging is not the Myers algorithm implemented here, but the so-called histogram algorithm, which can significantly improve the quality of merges.

To see an example where the diff algorithm makes a difference to the merged output, see for instance the test cases in this PR, which shows a case where using Myers creates various conflicts, while using histogram merges cleanly.

I wonder if implementing the histogram algorithm (in addition to Myers) would be in scope for this library?