diff options
author | jonathantanmy <jonathantanmy@google.com> | 2024-03-19 22:13:36 +0000 |
---|---|---|
committer | Gerrit Code Review <support@gerrithub.io> | 2024-03-19 22:13:36 +0000 |
commit | 967c4946fa270435404447564e04ecdef291542b (patch) | |
tree | 36112e6f4a793773db164eed5d7b70a0dbcb9a2e /org.eclipse.jgit | |
parent | 0acf07eb7a80f01ebfdb36bee9bfd566c8f9ce74 (diff) | |
parent | 72fa0a53e79265c11703ce848408ed328aed1e55 (diff) | |
download | jgit-967c4946fa270435404447564e04ecdef291542b.tar.gz jgit-967c4946fa270435404447564e04ecdef291542b.zip |
Merge "TreeRevFilter: correct changedPathFilter usage for multi-paths inclusion"
Diffstat (limited to 'org.eclipse.jgit')
-rw-r--r-- | org.eclipse.jgit/src/org/eclipse/jgit/revwalk/TreeRevFilter.java | 7 | ||||
-rw-r--r-- | org.eclipse.jgit/src/org/eclipse/jgit/treewalk/filter/TreeFilter.java | 2 |
2 files changed, 3 insertions, 6 deletions
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/TreeRevFilter.java b/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/TreeRevFilter.java index 43571a6868..99943b78e6 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/TreeRevFilter.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/TreeRevFilter.java @@ -139,11 +139,8 @@ public class TreeRevFilter extends RevFilter { .getPathsBestEffort(); if (paths.isPresent()) { changedPathFilterUsed = true; - for (byte[] path : paths.get()) { - if (!cpf.maybeContains(path)) { - mustCalculateChgs = false; - break; - } + if (paths.get().stream().noneMatch(cpf::maybeContains)) { + mustCalculateChgs = false; } } } diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/treewalk/filter/TreeFilter.java b/org.eclipse.jgit/src/org/eclipse/jgit/treewalk/filter/TreeFilter.java index 22d430bc27..a9066dc8f8 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/treewalk/filter/TreeFilter.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/treewalk/filter/TreeFilter.java @@ -210,7 +210,7 @@ public abstract class TreeFilter { public abstract boolean shouldBeRecursive(); /** - * If this filter checks that a specific set of paths have all been + * If this filter checks that at least one of the paths in a set has been * modified, returns that set of paths to be checked against a changed path * filter. Otherwise, returns empty. * |