aboutsummaryrefslogtreecommitdiffstats
path: root/org.eclipse.jgit.test
diff options
context:
space:
mode:
authorShawn O. Pearce <spearce@spearce.org>2010-08-06 09:48:50 -0700
committerShawn O. Pearce <spearce@spearce.org>2010-08-06 09:48:50 -0700
commit09130b8731cf17d24c4b0a77c8faf532bf22db2c (patch)
treedcfd3a6b3e14d94210069fbce75fbad64e70b809 /org.eclipse.jgit.test
parent8e9cc826e9275ce0e7ab51cc933923eb3b5f16ae (diff)
parente2f5716c940c5da22cbb3b0b08cb4ee7f2970580 (diff)
downloadjgit-09130b8731cf17d24c4b0a77c8faf532bf22db2c.tar.gz
jgit-09130b8731cf17d24c4b0a77c8faf532bf22db2c.zip
Merge branch 'rename-bug'
* rename-bug: Fix ArrayIndexOutOfBounds on non-square exact rename matrix Conflicts: org.eclipse.jgit/src/org/eclipse/jgit/diff/RenameDetector.java Change-Id: Ie0b8dd3e1ec174f79ba39dc4706bb0694cc8be29
Diffstat (limited to 'org.eclipse.jgit.test')
-rw-r--r--org.eclipse.jgit.test/tst/org/eclipse/jgit/diff/RenameDetectorTest.java5
1 files changed, 4 insertions, 1 deletions
diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/diff/RenameDetectorTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/diff/RenameDetectorTest.java
index 26116d2504..862fc0a594 100644
--- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/diff/RenameDetectorTest.java
+++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/diff/RenameDetectorTest.java
@@ -173,17 +173,20 @@ public class RenameDetectorTest extends RepositoryTestCase {
DiffEntry c = DiffEntry.add("c.txt", foo);
DiffEntry d = DiffEntry.delete("d.txt", foo);
+ DiffEntry e = DiffEntry.add("the_e_file.txt", foo);
// Add out of order to avoid first-match succeeding
rd.add(a);
rd.add(d);
+ rd.add(e);
rd.add(b);
rd.add(c);
List<DiffEntry> entries = rd.compute();
- assertEquals(2, entries.size());
+ assertEquals(3, entries.size());
assertRename(d, c, 100, entries.get(0));
assertRename(b, a, 100, entries.get(1));
+ assertCopy(d, e, 100, entries.get(2));
}
public void testExactRename_OneDeleteManyAdds() throws Exception {