]> source.dussan.org Git - jgit.git/commit
Stop PathFilter after walking all matching paths 88/9388/1
authorDave Borowitz <dborowitz@google.com>
Thu, 27 Dec 2012 17:29:44 +0000 (09:29 -0800)
committerDave Borowitz <dborowitz@google.com>
Thu, 27 Dec 2012 20:24:50 +0000 (12:24 -0800)
commit75eb6a147ffa8089e48d409f0215a16c755305e7
tree81f5f5c0907403946d5db23765364efe012033bb
parent154e3c886bafc429fe310d40741be34e5e4c87c9
Stop PathFilter after walking all matching paths

After the current path of the TreeWalk is no longer a prefix of the
PathFilter's path, there can be no more matching entries, but TreeWalk
will happily keep walking the rest of a (potentially very large and
recursive) tree unless StopWalkException is thrown. So, throw
StopWalkException from PathFilter.include() at the earliest
opportunity.

Change-Id: If6c4f395a3d5ed5b71bf68de23be9f2b0620e7f1
org.eclipse.jgit/src/org/eclipse/jgit/treewalk/filter/PathFilter.java