Define a basic merge API, and a two-way tree merge strategy
This basic merge implementation is sufficient to merge two commits in
memory and write the result out as a new commit, without having a work
tree on the local filesystem. It is therefore suitable for use within
a batch server process where human intervention is not available to
resolve conflicts.
This API should permit extending it with the working tree and a copy
of the work tree's DirCache, so edits in the tree can be merged in
parallel with edits from commits. But the functionality is not yet
implemented, so it is still a pie-in-the-sky concept.
The main strategy "simple-two-way-in-core" provides a basic 3 way
merge on the path level only. File contents are never patched by
this strategy, making it somewhat safe for automatic merges.
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Robin Rosenberg <robin.rosenberg@dewire.com>