Add a function get_tree().
Make message for UnexpectedMergeFailure sound less scary.

And give the user hope that progress is still possible.

Suggested by: Thomas Nilsson <knirch@unixangst.com>
Handle vertex merges more carefully.

When autofilling the vertex of a block, it is possible to do the merge
three ways:

1. Using the commits directly above and to the left as parents

2. Using the commits at [i1,0] and [i1-1,i2] as parents (i.e., as a
   continuation of the bottom edge)

3. Using the commits at [i1,i2-1] and [0,i2] as parents (i.e., as a
   continuation of the right edge)

We want the final history to be *as if* the parents were as in (1).

Formerly we were doing (1) and simply using the result.  This is
incorrect because the neighboring commits do not have correct
histories.  Therefore, the merge base for this merge is [0,0], and the
merge can have unnecessary conflicts.

Change to trying both (2) and (3).  If both of those commits succeed
*and* if they give identical trees, then create a synthetic commit
with the parents as in (1) and use that; otherwise, fail.
Merge branch 'vertex-consistency'

Handle the automatic merges at the vertex of a block more carefully,
by merging them two ways and verifying that the two resulting trees
are identical.