Refactor first stage of RevWalk's path limiter
commit7551933320ba8d21cec9e454bfb909031bac77d7
authorShawn O. Pearce <spearce@spearce.org>
Thu, 24 Apr 2008 03:27:21 +0000 (23 23:27 -0400)
committerShawn O. Pearce <spearce@spearce.org>
Sun, 11 May 2008 05:16:31 +0000 (11 01:16 -0400)
tree41ae66d2df879fedb41c525b936fe97415a5f44f
parentdec665dd29232700c399ae70f980e41cb81b1ebd
Refactor first stage of RevWalk's path limiter

After much reflection I realized that the include part of our
TreeFilterPendingGenerator was really the same as what any of
the RevFilter subclasses were trying to do, and that we can
really just combine the user supplied RevFilter with the one
we create for the first stage of the path limiter function.

This saves us a virtual dispatch in the common case, as we do
not call a no-op method that is by default defined to always
"return true".  It also makes the code a lot easier to follow.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
org.spearce.jgit/src/org/spearce/jgit/revwalk/Generator.java
org.spearce.jgit/src/org/spearce/jgit/revwalk/PendingGenerator.java [moved from org.spearce.jgit/src/org/spearce/jgit/revwalk/AbstractPendingGenerator.java with 70% similarity]
org.spearce.jgit/src/org/spearce/jgit/revwalk/RewriteGenerator.java
org.spearce.jgit/src/org/spearce/jgit/revwalk/RewriteTreeFilter.java [moved from org.spearce.jgit/src/org/spearce/jgit/revwalk/TreeFilterPendingGenerator.java with 89% similarity]
org.spearce.jgit/src/org/spearce/jgit/revwalk/StartGenerator.java