Browse Source

Merge "Revert "Stop PathFilter after walking all matching paths""

stable-2.3
Robin Rosenberg 12 years ago committed by Gerrit Code Review @ Eclipse.org
parent
commit
c8c258169f
  1. 6
      org.eclipse.jgit/src/org/eclipse/jgit/treewalk/filter/PathFilter.java

6
org.eclipse.jgit/src/org/eclipse/jgit/treewalk/filter/PathFilter.java

@ -44,7 +44,6 @@
package org.eclipse.jgit.treewalk.filter; package org.eclipse.jgit.treewalk.filter;
import org.eclipse.jgit.errors.StopWalkException;
import org.eclipse.jgit.internal.JGitText; import org.eclipse.jgit.internal.JGitText;
import org.eclipse.jgit.lib.Constants; import org.eclipse.jgit.lib.Constants;
import org.eclipse.jgit.treewalk.TreeWalk; import org.eclipse.jgit.treewalk.TreeWalk;
@ -98,10 +97,7 @@ public class PathFilter extends TreeFilter {
@Override @Override
public boolean include(final TreeWalk walker) { public boolean include(final TreeWalk walker) {
int cmp = walker.isPathPrefix(pathRaw, pathRaw.length); return walker.isPathPrefix(pathRaw, pathRaw.length) == 0;
if (cmp > 0)
throw StopWalkException.INSTANCE;
return cmp == 0;
} }
@Override @Override

Loading…
Cancel
Save