|
|
@@ -53,8 +53,11 @@ import java.io.PrintWriter; |
|
|
|
import java.text.MessageFormat; |
|
|
|
import java.util.List; |
|
|
|
|
|
|
|
import org.eclipse.jgit.diff.DiffAlgorithm; |
|
|
|
import org.eclipse.jgit.diff.DiffEntry; |
|
|
|
import org.eclipse.jgit.diff.DiffFormatter; |
|
|
|
import org.eclipse.jgit.diff.HistogramDiff; |
|
|
|
import org.eclipse.jgit.diff.MyersDiff; |
|
|
|
import org.eclipse.jgit.diff.RawTextComparator; |
|
|
|
import org.eclipse.jgit.diff.RenameDetector; |
|
|
|
import org.eclipse.jgit.dircache.DirCacheIterator; |
|
|
@@ -98,6 +101,21 @@ class Diff extends TextBuiltin { |
|
|
|
detectRenames = Boolean.FALSE; |
|
|
|
} |
|
|
|
|
|
|
|
enum SupportedAlgorithm { |
|
|
|
myers(MyersDiff.INSTANCE), histogram(new HistogramDiff()); |
|
|
|
|
|
|
|
public DiffAlgorithm algorithm; |
|
|
|
|
|
|
|
SupportedAlgorithm(DiffAlgorithm a) { |
|
|
|
algorithm = a; |
|
|
|
} |
|
|
|
}; |
|
|
|
|
|
|
|
@Option(name = "--algorithm", usage = "usage_diffAlgorithm") |
|
|
|
void setAlgorithm(SupportedAlgorithm s) { |
|
|
|
diffFmt.setDiffAlgorithm(s.algorithm); |
|
|
|
} |
|
|
|
|
|
|
|
@Option(name = "-l", usage = "usage_renameLimit") |
|
|
|
private Integer renameLimit; |
|
|
|
|