Murmele / Gittyup

Understand your Git history!
https://murmele.github.io/Gittyup
MIT License
1.37k stars 107 forks source link

Add support for merge.conflictStyle diff3/zdiff3 #707

Open noahadvs opened 4 months ago

noahadvs commented 4 months ago

When merge.conflictStyle is set to diff3/zdiff3, Gittyup will try to include the "base" code snippet in the "ours" code snippet when doing conflict resolution in the GUI. To support diff3 style, it would be better to add a "Use Base" action (or something equivalent) like the "Use Ours" and "Use Theirs" actions. The "base" snippet should only be used by the "Use Base" action (or something equivalent).

Screenshot of the issue in the GUI:

Screenshot_20240227_044653

diff3/zdiff3 conflictStyle is this:

<<<<<<< ours:sample.txt
or cleanly resolved because both sides changed the same way.
Conflict resolution is hard;
let's go shopping.
||||||| base:sample.txt
or cleanly resolved because both sides changed identically.
Conflict resolution is hard.
=======
or cleanly resolved because both sides changed the same way.
Git makes conflict resolution easy.
>>>>>>> theirs:sample.txt

The default conflictStyle is this:

<<<<<<< ours:sample.txt
Conflict resolution is hard;
let's go shopping.
=======
Git makes conflict resolution easy.
>>>>>>> theirs:sample.txt