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
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;
@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