Define two TreeWalk utility factory methods for single path lookup
commitf08575b6dafcc2ae123674bc5a5c225e9ac4f51d
authorShawn O. Pearce <spearce@spearce.org>
Thu, 27 Mar 2008 04:01:08 +0000 (27 00:01 -0400)
committerShawn O. Pearce <spearce@spearce.org>
Mon, 7 Apr 2008 05:06:21 +0000 (7 01:06 -0400)
treebfe5a1734a9c0345b4bbe1ffe4c51b343cd089cc
parentdc6086d4ad98408ad97644a87f889fa1ade39863
Define two TreeWalk utility factory methods for single path lookup

If an application just needs to resolve a single path in a tree it
can be faster to use a one-shot TreeWalk with the correct path in
a filter then doing the lookup through the Tree/TreeEntry API, as
the Tree API requires lots of object allocations for paths we do
not want to access.

These utility functions allow construction of a one-shot tree walk
for either a group of trees or a single RevTree, and position the
walker at the one requested entry.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
org.spearce.jgit/src/org/spearce/jgit/treewalk/TreeWalk.java