Software

The best Diff so far

We recently heard about two really far branches in our codebase. Your mission, should you choose to accept it, is finding the changes and merging them.

So I try a GIT diff within Atlassian SourceTree, my GIT client of choice, and the result is unusable: the developers not only made a lot of changes within the same functions, but they also moved functions across the source file, and diff is trying to reconcile different pieces of code that have some similarity.

Enter WinMerge. More or less, the result is comparable to what I had with GIT, back to square one.

After a search on the net, I have found DiffMerge from SourceGear. Running it on the same code, I got a vastly better result, as it recognizes that is parsing C++ code and seems to use function definitions to resynch changes, this way avoiding reporting similar lines of code from different functions as a match. Of course, it does not track functions moved across the source file, but it is fairly easy to spot them, as they appear as code blocks appearing only on the left or right column in the trackbar on the left.

Mission accomplished!

Diff

Leave a Reply

Your email address will not be published. Required fields are marked *