Support iterating and building a DirCache at the same time
commit0c7bfc59536d531b0b2dbc903776e9bf43d0c577
authorShawn O. Pearce <spearce@spearce.org>
Tue, 12 Aug 2008 01:08:00 +0000 (11 18:08 -0700)
committerRobin Rosenberg <robin.rosenberg@dewire.com>
Thu, 14 Aug 2008 17:33:20 +0000 (14 19:33 +0200)
tree3a0420a7936f0ca02febfea768d71b404cc8d396
parent0feb8ce37ed53a22318ced4abe61f4c818368883
Support iterating and building a DirCache at the same time

This iterator combines the DirCacheBuilder add-in-order update strategy
with a suitable TreeWalk iterator, allowing entries which the TreeWalk
does not return to the application to be automatically carried into the
new index, and the application to handle the entires which the TreeWalk
does return to it.

This can be used to implement a simple "rm" function which removes one
or more paths from the index, while leaving the rest of the index alone.

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/dircache/DirCacheBuildIterator.java [new file with mode: 0644]