]> source.dussan.org Git - jgit.git/commit
Make diff algorithm configurable 57/1957/2
authorChristian Halstrick <christian.halstrick@sap.com>
Thu, 25 Nov 2010 23:30:08 +0000 (00:30 +0100)
committerChristian Halstrick <christian.halstrick@sap.com>
Thu, 25 Nov 2010 23:30:08 +0000 (00:30 +0100)
commit049827d7080201fe24f2728b26d681434327f72a
treeffb4bc655c9ea98ed62e8194ecd6acca407cd912
parent7e298c9ed538dd8d5207adce3497b4a1df701dc5
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>
org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Diff.java
org.eclipse.jgit.test/tst/org/eclipse/jgit/merge/MergeAlgorithmTest.java
org.eclipse.jgit/src/org/eclipse/jgit/diff/DiffAlgorithm.java
org.eclipse.jgit/src/org/eclipse/jgit/diff/DiffFormatter.java
org.eclipse.jgit/src/org/eclipse/jgit/lib/ConfigConstants.java
org.eclipse.jgit/src/org/eclipse/jgit/merge/MergeAlgorithm.java
org.eclipse.jgit/src/org/eclipse/jgit/merge/ResolveMerger.java