There is an obvious sequel to this story. We can enhance the behaviour of
checkout out of the index during a conflicted merge by doing the
following, which is the reason why I stumbled upon this bug that was fixed
by these two patches:
* Teach "git checkout --ours", "git checkout ---theirs" so that stages 2
and stages 3 for unmerged paths are checked out (and possibly resolve
the conflict).
* Teach "git checkout --merge" to redo the file level merge between
stages 1/2/3, and update the work tree with the result.