Preface
This question is about understanding the basic unified diff output format. Three way diffing and merging is probably something best done from the comfort of a proper GUI merge tool, or at the very least, vim diff mode with plugins like fugitive.vim.
Question
I find that running git diff
while merging a conflict produces a diff view that has two columns of pluses and minuses.
It's clear that in comparing three different versions of the same data we'll need more information than when comparing just two. But what do these columns actually mean? There are clearly now a lot more combinations for the possible "bucket" that a given line now belongs to. It used to just be either blank (same), +
(added) or -
(deleted), and now we have blank, ++
, --
, +
, +
, -
, and -
. And possibly even more that I hadn't seen.