From 049827d7080201fe24f2728b26d681434327f72a Mon Sep 17 00:00:00 2001 From: Christian Halstrick Date: Fri, 26 Nov 2010 00:30:08 +0100 Subject: 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 Signed-off-by: Philipp Thun --- .../tst/org/eclipse/jgit/merge/MergeAlgorithmTest.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'org.eclipse.jgit.test/tst/org') 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); -- cgit v1.2.3