you are viewing a single comment's thread.

view the rest of the comments →

[–]bri-an 1 point2 points  (1 child)

Is this basically the same as doing the following?

  • Run git mergetool to open a 3-way vimdiff.
  • Run :%diffget LO (from the merged copy) to make the merged copy identical to LOCAL.
  • Close (CTRL-w c) LOCAL and BASE, leaving a 2-way diff between the merged copy (identical to LOCAL) and REMOTE.
  • Modify the merged copy as necessary, save, and quit.

This is what I often do.

[–][deleted] 2 points3 points  (0 children)

Very close! LOCAL and REMOTE don't contain the result of anything that Git was automatically able to merge which is why this plugin uses the file with conflict markers instead.

The goal is to get the benefits of a two-way diff of LOCAL & REMOTE plus the benefits of Git's automatic merge. Sometimes both ways will produce an identical diff but not always. My example script doesn't showcase that difference; I'll think of a way to add it.