diff options
author | Ivan Frade <ifrade@google.com> | 2024-05-31 12:20:07 -0700 |
---|---|---|
committer | Ivan Frade <ifrade@google.com> | 2024-05-31 13:41:09 -0700 |
commit | 5e8fcfa853d99e036df9c9dc638370e40804fd38 (patch) | |
tree | d9871d7a031c2f9b13a296b5103ddabfa2f047cb /org.eclipse.jgit.test/tst | |
parent | 37a36201a1999690500e5af7f16fa881a484a0ca (diff) | |
download | jgit-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.java | 2 |
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 { |