Refactor the old/pre-image data in HunkHeader to support >1 ancestor
commit57bc64a709016506efd4a4b7b7f78d8d2d99362f
authorShawn O. Pearce <spearce@spearce.org>
Fri, 12 Dec 2008 22:05:51 +0000 (12 14:05 -0800)
committerRobin Rosenberg <robin.rosenberg@dewire.com>
Sat, 13 Dec 2008 02:13:27 +0000 (13 03:13 +0100)
tree748cb50cb20f1c2a586c079bed69684c2ba20b18
parentcf34c3fcc676f6603f2dfdbcb149b859bf55044c
Refactor the old/pre-image data in HunkHeader to support >1 ancestor

The "diff --cc" format uses more than one ancestor in each hunk,
so we need to expand the hunk header information in a way that
allows access to the data for each ancestor.  This change moves
the information relative to the old/pre-image ancestor in a 2-way
patch into an OldImage object.  In a 2-way patch we only have
one OldImage, but in a "diff --cc" patch we will have more than
one of these available in each hunk.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Robin Rosenberg <robin.rosenberg@dewire.com>
org.spearce.jgit.test/exttst/org/spearce/jgit/patch/EGitPatchHistoryTest.java
org.spearce.jgit.test/tst/org/spearce/jgit/patch/PatchTest.java
org.spearce.jgit/src/org/spearce/jgit/patch/HunkHeader.java