Micro-optimize TreeWalk's exitSubtree implementation
commit248f97256823854072649b0d30e8efbd70d88424
authorShawn O. Pearce <spearce@spearce.org>
Thu, 21 Aug 2008 20:57:37 +0000 (21 13:57 -0700)
committerRobin Rosenberg <robin.rosenberg@dewire.com>
Wed, 27 Aug 2008 21:58:26 +0000 (27 23:58 +0200)
tree0f2bf5c306848938affeed4b741337c9ef6a6e18
parent91d92e4ae3be3dd78bc9a54680e87b2b3332278b
Micro-optimize TreeWalk's exitSubtree implementation

Rather than recomputing the min over again we can take the hint that
the prior min (the one that describes the tree we just left) must be
one that matches itself.  There may be more than one such case, as a
min could be found and match itself and later another min is found.
So we fall back into a pathCompare if we identify more than one.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Robin Rosenberg <robin.rosenberg@dewire.com>
org.spearce.jgit/src/org/spearce/jgit/treewalk/TreeWalk.java