diff options
author | Christian Halstrick <christian.halstrick@sap.com> | 2010-11-26 00:30:08 +0100 |
---|---|---|
committer | Christian Halstrick <christian.halstrick@sap.com> | 2010-11-26 00:30:08 +0100 |
commit | 049827d7080201fe24f2728b26d681434327f72a (patch) | |
tree | ffb4bc655c9ea98ed62e8194ecd6acca407cd912 /org.eclipse.jgit.test/tst/org | |
parent | 7e298c9ed538dd8d5207adce3497b4a1df701dc5 (diff) | |
download | jgit-049827d7080201fe24f2728b26d681434327f72a.tar.gz jgit-049827d7080201fe24f2728b26d681434327f72a.zip |
Make diff algorithm configurable
The diff algorithm which is used by Merge, Cherry-Pick, Rebase
should be configurable. A new configuration parameter "diff.algorithm"
is introduced which currently accepts the values "myers" or
"histogram". Based on this parameter for example the ResolveMerger
will choose a diff algorithm. The reason for this is bug 331078.
This bug shows that JGit is more compatible with C Git when
histogram diff is in place. But since histogram diff is quite new we
need an easy way to fall back to Myers diff.
Bug: 331078
Change-Id: I2549c992e478d991c61c9508ad826d1a9e539ae3
Signed-off-by: Christian Halstrick <christian.halstrick@sap.com>
Signed-off-by: Philipp Thun <philipp.thun@sap.com>
Diffstat (limited to 'org.eclipse.jgit.test/tst/org')
-rw-r--r-- | org.eclipse.jgit.test/tst/org/eclipse/jgit/merge/MergeAlgorithmTest.java | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/merge/MergeAlgorithmTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/merge/MergeAlgorithmTest.java index 9b4b7146f6..b17c5278e1 100644 --- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/merge/MergeAlgorithmTest.java +++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/merge/MergeAlgorithmTest.java @@ -166,7 +166,7 @@ public class MergeAlgorithmTest extends TestCase { } private String merge(String commonBase, String ours, String theirs) throws IOException { - MergeResult r = MergeAlgorithm.merge(RawTextComparator.DEFAULT, + MergeResult r = new MergeAlgorithm().merge(RawTextComparator.DEFAULT, T(commonBase), T(ours), T(theirs)); ByteArrayOutputStream bo=new ByteArrayOutputStream(50); fmt.formatMerge(bo, r, "B", "O", "T", Constants.CHARACTER_ENCODING); |