aboutsummaryrefslogtreecommitdiffstats
path: root/org.eclipse.jgit.test/tst
diff options
context:
space:
mode:
authorIvan Frade <ifrade@google.com>2024-05-31 12:20:07 -0700
committerIvan Frade <ifrade@google.com>2024-05-31 13:41:09 -0700
commit5e8fcfa853d99e036df9c9dc638370e40804fd38 (patch)
treed9871d7a031c2f9b13a296b5103ddabfa2f047cb /org.eclipse.jgit.test/tst
parent37a36201a1999690500e5af7f16fa881a484a0ca (diff)
downloadjgit-5e8fcfa853d99e036df9c9dc638370e40804fd38.tar.gz
jgit-5e8fcfa853d99e036df9c9dc638370e40804fd38.zip
CommitGraphWriter: use ANY_DIFF instead of idEquals inside next()
Calculating the paths modified in a commit respect its parents is taking undue amount of time in big trees. Use ANY_DIFF filter, instead of #idEquals() inside the #next(). This shorcuts the tree browsing earlier. Change-Id: I318eee3ae817b7b9004d60bdb8d0f1bf19b9962d
Diffstat (limited to 'org.eclipse.jgit.test/tst')
-rw-r--r--org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/commitgraph/CommitGraphWriterTest.java2
1 files changed, 2 insertions, 0 deletions
diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/commitgraph/CommitGraphWriterTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/commitgraph/CommitGraphWriterTest.java
index 7130d59b95..80a0f0cea5 100644
--- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/commitgraph/CommitGraphWriterTest.java
+++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/commitgraph/CommitGraphWriterTest.java
@@ -435,6 +435,8 @@ public class CommitGraphWriterTest extends RepositoryTestCase {
.map(b -> StandardCharsets.UTF_8.decode(b).toString())
.collect(toList());
assertThat(asString, containsInAnyOrder("d", "d/sd2", "d/sd2/f2"));
+ // We don't walk into d/sd1/f1
+ assertEquals(1, c.stepCounter);
}
RevCommit commit(RevCommit... parents) throws Exception {