Allow AbstractTreeIterator subclasses to supply their own path array
commit206c4fea9163d37c1a09ad99ce46087e809cd2e5
authorShawn O. Pearce <spearce@spearce.org>
Sun, 10 Aug 2008 08:46:19 +0000 (10 01:46 -0700)
committerRobin Rosenberg <robin.rosenberg@dewire.com>
Wed, 13 Aug 2008 19:55:55 +0000 (13 21:55 +0200)
treeb5718cb12ccc7dc2f58d99fe8ffbd64afc975731
parentcbe13b151906abde49cf16b63b4d50eabf1d4090
Allow AbstractTreeIterator subclasses to supply their own path array

Some forms of AbstractTreeIterator may already have the path buffer
they want their child iterator to use in memory when the child is
being created.  Therefore they do not want the existing constructor
as it would modify the parent's path buffer, and force the subclass
to copy the new child's path.

By allowing subclass implementations to define their own path buffer
we must rely on them to do the right thing in terms of setting up a
valid buffer for iteration, but the implementation can avoid copies
and unwanted data changes to the parent array.

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/AbstractTreeIterator.java