"Move" support in xdiffOne of the big things we just released in 3.0 is the new Xdiff. We call it "cross diff" because it can locate code that has been moved, and we used to draw it on paper with "crossing lines".
Ok, what is all of this about and why is it so good? Let's go.
Let's start with a piece of code like the following:
Then we move a piece of code a little bit down:
And we slightly modify the moved code as you can see here:
Let's see what Plastic Xdiff can do:
It is able to identify the code as "moved" even when it has been modified. And you can click on the "subdiff" to actually run an independent diff on the moved fragment as you can see below.
Cool, isn't it?
We can do this with any programming language since the algorithm is not based on parsing but in plain text move detection.
Check the following screencast to see it in action.
Don't forget to check the next step too: Xmerge!