Felipe Contreras [off-list ref] writes:
Johannes Sixt wrote:
quoted
then diff3 must display the conflict as
12<ABC|34=AXC>56
to be technically correct. RCS style can coalesce A and C outside of the
conflict and display it as
12A<B=X>C34
and *that* is the helpful part of this simpler style.
I have trouble translating the above to what I'm familiar with in my
mind, so...
diff2:
1
2
A
<<<<<<< l
B
=======
X
>>>>>>> r
C
5
6
diff3:
1
2
<<<<<<< l
A
B
C
||||||| b
3
4
=======
A
X
C
>>>>>>> r
5
6
I personally don't mind at all having a few extra lines in order to
visualize what actually happened.
Plus a good tool should have an option to quickly show a diff between any
2 of 3 parts, making analysis even simpler.
But of course there's zdiff3:
1
2
A
<<<<<<< l
B
||||||| b
3
4
=======
X
>>>>>>> r
C
5
6
Which is the best of both worlds, even if not technically accurate.
Yeah, now I see, thank you both for explanations!
That said, to me it seems that for any of 3 formats one can find a case
where it's better than the other 2. I'm sure I got a few occasions where
leaving common part(s) out of conflicts resulted in a confusion and
mis-merge.
Thanks,
-- Sergey Organov
Sergey Organov wrote:
Felipe Contreras [off-list ref] writes:
quoted
Johannes Sixt wrote:
quoted
then diff3 must display the conflict as
12<ABC|34=AXC>56
to be technically correct. RCS style can coalesce A and C outside of the
conflict and display it as
12A<B=X>C34
and *that* is the helpful part of this simpler style.
I have trouble translating the above to what I'm familiar with in my
mind, so...
diff2:
1
2
A
<<<<<<< l
B
=======
X
>>>>>>> r
C
5
6
diff3:
1
2
<<<<<<< l
A
B
C
||||||| b
3
4
=======
A
X
C
>>>>>>> r
5
6
I personally don't mind at all having a few extra lines in order to
visualize what actually happened.
Plus a good tool should have an option to quickly show a diff between any
2 of 3 parts, making analysis even simpler.
Indeed, it depends on the mergetool, but personally I use vimdiff3
(which I authored). All I need are diff3 conflict markers plus some
colors.
quoted
But of course there's zdiff3:
1
2
A
<<<<<<< l
B
||||||| b
3
4
=======
X
>>>>>>> r
C
5
6
Which is the best of both worlds, even if not technically accurate.
Yeah, now I see, thank you both for explanations!
That said, to me it seems that for any of 3 formats one can find a case
where it's better than the other 2. I'm sure I got a few occasions where
leaving common part(s) out of conflicts resulted in a confusion and
mis-merge.
Yes, and I found it curious that all this sprang up from my suggestion
to get out of our comfort zones.
Since I don't have my beloved `g mt` alias, I've been forced to do
`g mergetool --tool=gvimdiff3`, once there, I decided to use gvimdiff2 a
couple of times, and I even gave meld a try.
Now, I didn't dare to remove merge.conflictstyle from my config, but if
I did, I would I have immediately noticed that:
git merge --<tab>
There's nothing to easily switch conflict styles.
Seems like there's many areas of opportunity.
Cheers.
--
Felipe Contreras