Define a basic merge API, and a two-way tree merge strategy
commit60031381f52737a43b6411cc695be64e9a598b49
authorShawn O. Pearce <spearce@spearce.org>
Thu, 22 Jan 2009 23:28:09 +0000 (22 15:28 -0800)
committerRobin Rosenberg <robin.rosenberg@dewire.com>
Fri, 23 Jan 2009 22:27:18 +0000 (23 23:27 +0100)
treeb2ac621ce2e90042b82b8039eed9b37509565472
parent1f800e062f6149b439339b0fa5c0bd94f9fa321f
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>
org.spearce.jgit/src/org/spearce/jgit/merge/MergeStrategy.java [new file with mode: 0644]
org.spearce.jgit/src/org/spearce/jgit/merge/Merger.java [new file with mode: 0644]
org.spearce.jgit/src/org/spearce/jgit/merge/StrategyOneSided.java [new file with mode: 0644]
org.spearce.jgit/src/org/spearce/jgit/merge/StrategySimpleTwoWayInCore.java [new file with mode: 0644]