aboutsummaryrefslogtreecommitdiffstats
path: root/org.eclipse.jgit/src/org/eclipse/jgit/merge/MergeAlgorithm.java
diff options
context:
space:
mode:
authorChristian Halstrick <christian.halstrick@sap.com>2010-11-26 00:44:05 +0100
committerChristian Halstrick <christian.halstrick@sap.com>2010-11-26 00:44:05 +0100
commit12a5c8d413baab3f27932a7c850dbfc0407ded78 (patch)
tree3510973a7686249a33b1e044b8cb5a28970a5532 /org.eclipse.jgit/src/org/eclipse/jgit/merge/MergeAlgorithm.java
parent049827d7080201fe24f2728b26d681434327f72a (diff)
downloadjgit-12a5c8d413baab3f27932a7c850dbfc0407ded78.tar.gz
jgit-12a5c8d413baab3f27932a7c850dbfc0407ded78.zip
Change default diff algorithm to histogram and add tests
The referenced bug showed that JGit produced different merge results compared to C Git. Unit test was added to reproduce the issue. The problem can be solved by switching to histogram diff algorithm. Bug: 331078 Change-Id: I54f30afb3a9fef1dbca365ca5f98f4cc846092e3 Signed-off-by: Christian Halstrick <christian.halstrick@sap.com> Signed-off-by: Philipp Thun <philipp.thun@sap.com>
Diffstat (limited to 'org.eclipse.jgit/src/org/eclipse/jgit/merge/MergeAlgorithm.java')
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/merge/MergeAlgorithm.java8
1 files changed, 4 insertions, 4 deletions
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/merge/MergeAlgorithm.java b/org.eclipse.jgit/src/org/eclipse/jgit/merge/MergeAlgorithm.java
index 62febd62c2..e6688f5bc9 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/merge/MergeAlgorithm.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/merge/MergeAlgorithm.java
@@ -50,24 +50,24 @@ import java.util.List;
import org.eclipse.jgit.diff.DiffAlgorithm;
import org.eclipse.jgit.diff.Edit;
import org.eclipse.jgit.diff.EditList;
-import org.eclipse.jgit.diff.MyersDiff;
+import org.eclipse.jgit.diff.HistogramDiff;
import org.eclipse.jgit.diff.Sequence;
import org.eclipse.jgit.diff.SequenceComparator;
import org.eclipse.jgit.merge.MergeChunk.ConflictState;
/**
* Provides the merge algorithm which does a three-way merge on content provided
- * as RawText. By default {@link MyersDiff} is used as diff algorithm.
+ * as RawText. By default {@link HistogramDiff} is used as diff algorithm.
*/
public final class MergeAlgorithm {
private final DiffAlgorithm diffAlg;
/**
- * Creates a new MergeAlgorithm which uses {@link MyersDiff} as diff
+ * Creates a new MergeAlgorithm which uses {@link HistogramDiff} as diff
* algorithm
*/
public MergeAlgorithm() {
- this(MyersDiff.INSTANCE);
+ this(new HistogramDiff());
}
/**