diff options
author | Shawn Pearce <sop@google.com> | 2013-01-01 12:25:26 -0500 |
---|---|---|
committer | Gerrit Code Review @ Eclipse.org <gerrit@eclipse.org> | 2013-01-01 12:25:26 -0500 |
commit | 0b6387fe7c575b40578a8478392eb1cf35f8a136 (patch) | |
tree | 7882b0f84e588e550f1f74a0a5b9ae6fbe344719 /org.eclipse.jgit | |
parent | 75eb6a147ffa8089e48d409f0215a16c755305e7 (diff) | |
download | jgit-0b6387fe7c575b40578a8478392eb1cf35f8a136.tar.gz jgit-0b6387fe7c575b40578a8478392eb1cf35f8a136.zip |
Revert "Stop PathFilter after walking all matching paths"
This reverts commit 75eb6a147ffa8089e48d409f0215a16c755305e7.
Applications that want a PathFilter to abort the walk early should be
using PathFilterGroup. When a PathFilterGroup is created with exactly
one path its implementation is the same that 75eb6 tried to perform,
but has been long documented as having the behavior of breaking a
higher level OR filter graph node.
Change-Id: I6c85d75c474784471c32e866eef3402b9f193c08
Diffstat (limited to 'org.eclipse.jgit')
-rw-r--r-- | org.eclipse.jgit/src/org/eclipse/jgit/treewalk/filter/PathFilter.java | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/treewalk/filter/PathFilter.java b/org.eclipse.jgit/src/org/eclipse/jgit/treewalk/filter/PathFilter.java index 365a820981..d85ea8cc5d 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/treewalk/filter/PathFilter.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/treewalk/filter/PathFilter.java @@ -44,7 +44,6 @@ package org.eclipse.jgit.treewalk.filter; -import org.eclipse.jgit.errors.StopWalkException; import org.eclipse.jgit.internal.JGitText; import org.eclipse.jgit.lib.Constants; import org.eclipse.jgit.treewalk.TreeWalk; @@ -98,10 +97,7 @@ public class PathFilter extends TreeFilter { @Override public boolean include(final TreeWalk walker) { - int cmp = walker.isPathPrefix(pathRaw, pathRaw.length); - if (cmp > 0) - throw StopWalkException.INSTANCE; - return cmp == 0; + return walker.isPathPrefix(pathRaw, pathRaw.length) == 0; } @Override |