views:

25

answers:

1

Why am I given three choices when merging between my code and someone else's? Shouldn't there just be my code, the other person's code, and the output below? The documentation for KDIFF doesn't help me understand.

+1  A: 

Sounds like you're doing a three-way merge, so A should be the base revision that B and C are based on, B is theirs and C is yours (I believe; B and C might be the opposite, though).

eldarerathis
What is the base revision about? Does that help in some cases?
@user464095: For KDiff I believe that it's the revision that both B and C are modifying. So you can compare B to its base (A), C to its base (also A) and the changes in B and C to each other. That way you can resolve conflicts by using the changes in B or C or by reverting to the original (A).
eldarerathis
I still don't understand, can you elaborate some more?
Well, consider a case where you and another developer make conflicting changes to the same code. It's typically helpful to have the context of the original file, so you know if either one of you is breaking previous functionality. You could diff your file with the other developer's, resolve conflicts, and then diff it with the original, but a three-way diff performs the same function in fewer steps.
eldarerathis