Page 1 of 1

Improved Diff and Merge

PostPosted: Thu Sep 01, 2011 7:17 pm
by corwinjoy
Assuming there is enough momentum behind a new version of WinMerge I'd really like to see the program be smarter about diffs. A lot of the diffs generated by the current version are not all that readable and could be made a lot better by using more modern diff algorithms. Here are two outlines of how a basic diff can be made better:
1. Better context for moves and identification of diffs. The idea is explained by Neil Frasier here (http://neil.fraser.name/writing/diff/) and implemented in the Google diff and patch library.
2. Be smarter about the diff problem that is being solved, match up unique lines between the files first to form better alignment points and then fill in elements such as blank lines or braces that may be repeated. The algorithm is explained here: http://alfedenzo.livejournal.com/170301.html and is supposedly used in bazaar http://bramcohen.livejournal.com/37690.html . This might give a lot more readable diffs for code.

I have experience writing diff algorithms (http://xsdevolver.sourceforge.net/) and Qt so I could contribute to help get improved diff into the tool.

Re: Improved Diff and Merge

PostPosted: Fri Aug 08, 2014 6:08 pm
by thistleknot
I'm hoping to start up on this.