]> source.dussan.org Git - jgit.git/commit
Add reset() to AbstractTreeIterator API 87/1487/1
authorShawn O. Pearce <spearce@spearce.org>
Wed, 1 Sep 2010 16:20:33 +0000 (09:20 -0700)
committerShawn O. Pearce <spearce@spearce.org>
Wed, 1 Sep 2010 17:19:43 +0000 (10:19 -0700)
commit408d4b5375c4731a83e2f091d62d05157abcb21e
tree7fb5313029b75502835133446d09c06728a5eca0
parent9f323462bec480802957cdc6c90f3908b82ec83c
Add reset() to AbstractTreeIterator API

This allows callers to force the iterator back to its starting point,
so it can be traversed again.  The default way to do this is to use
back(1) until first() is true, but this isn't very efficient for any
iterator.  All current implementations have better ways to implement
reset without needing to seek backwards.

Change-Id: Ia26e6c852fdac8a0e9c80ac72c8cca9d897463f4
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
org.eclipse.jgit/src/org/eclipse/jgit/dircache/DirCacheIterator.java
org.eclipse.jgit/src/org/eclipse/jgit/treewalk/AbstractTreeIterator.java
org.eclipse.jgit/src/org/eclipse/jgit/treewalk/CanonicalTreeParser.java
org.eclipse.jgit/src/org/eclipse/jgit/treewalk/EmptyTreeIterator.java
org.eclipse.jgit/src/org/eclipse/jgit/treewalk/WorkingTreeIterator.java