]> source.dussan.org Git - jgit.git/commit
Refactor diff sequence API 02/1502/6
authorShawn O. Pearce <spearce@spearce.org>
Thu, 2 Sep 2010 19:53:27 +0000 (12:53 -0700)
committerChris Aniszczyk <caniszczyk@gmail.com>
Tue, 7 Sep 2010 02:37:11 +0000 (21:37 -0500)
commit67263e2056108e471d684c3cef9e719724b51220
treee4ea7623e4b0884b542c77167ab456e3643eb5ed
parent18aadc826dae7c6308c2a6c68d48ab75c8dd9b6d
Refactor diff sequence API

Instead of making the sequence itself responsible for the equivalence
function, use an external function that is supplied by the caller.
This cleans up the code because we now say cmp.equals(a, ai, b, bi)
instead of a.equals(ai, b, bi).

This refactoring also removes the odd concept of creating different
types of sequences to have different behaviors for whitespace
ignoring.  Instead DiffComparator now supports singleton functions
that apply a particular equivalence algorithm to a type of sequence.

Change-Id: I559f494d81cdc6f06bfb4208f60780c0ae251df9
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
27 files changed:
org.eclipse.jgit.iplog/src/org/eclipse/jgit/iplog/IpLogGenerator.java
org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Diff.java
org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Log.java
org.eclipse.jgit.test/tst/org/eclipse/jgit/diff/MyersDiffPerformanceTest.java
org.eclipse.jgit.test/tst/org/eclipse/jgit/diff/MyersDiffTest.java
org.eclipse.jgit.test/tst/org/eclipse/jgit/diff/RawTextIgnoreAllWhitespaceTest.java
org.eclipse.jgit.test/tst/org/eclipse/jgit/diff/RawTextIgnoreLeadingWhitespaceTest.java
org.eclipse.jgit.test/tst/org/eclipse/jgit/diff/RawTextIgnoreTrailingWhitespaceTest.java
org.eclipse.jgit.test/tst/org/eclipse/jgit/diff/RawTextIgnoreWhitespaceChangeTest.java
org.eclipse.jgit.test/tst/org/eclipse/jgit/diff/RawTextTest.java
org.eclipse.jgit.test/tst/org/eclipse/jgit/merge/MergeAlgorithmTest.java
org.eclipse.jgit/src/org/eclipse/jgit/api/MergeCommand.java
org.eclipse.jgit/src/org/eclipse/jgit/api/MergeResult.java
org.eclipse.jgit/src/org/eclipse/jgit/diff/DiffFormatter.java
org.eclipse.jgit/src/org/eclipse/jgit/diff/MyersDiff.java
org.eclipse.jgit/src/org/eclipse/jgit/diff/RawText.java
org.eclipse.jgit/src/org/eclipse/jgit/diff/RawTextComparator.java [new file with mode: 0644]
org.eclipse.jgit/src/org/eclipse/jgit/diff/RawTextIgnoreAllWhitespace.java [deleted file]
org.eclipse.jgit/src/org/eclipse/jgit/diff/RawTextIgnoreLeadingWhitespace.java [deleted file]
org.eclipse.jgit/src/org/eclipse/jgit/diff/RawTextIgnoreTrailingWhitespace.java [deleted file]
org.eclipse.jgit/src/org/eclipse/jgit/diff/RawTextIgnoreWhitespaceChange.java [deleted file]
org.eclipse.jgit/src/org/eclipse/jgit/diff/Sequence.java
org.eclipse.jgit/src/org/eclipse/jgit/diff/SequenceComparator.java [new file with mode: 0644]
org.eclipse.jgit/src/org/eclipse/jgit/merge/MergeAlgorithm.java
org.eclipse.jgit/src/org/eclipse/jgit/merge/MergeFormatter.java
org.eclipse.jgit/src/org/eclipse/jgit/merge/MergeResult.java
org.eclipse.jgit/src/org/eclipse/jgit/merge/ResolveMerger.java