Support recreating a .git/index through DirCache
commit0feb8ce37ed53a22318ced4abe61f4c818368883
authorShawn O. Pearce <spearce@spearce.org>
Tue, 12 Aug 2008 01:07:59 +0000 (11 18:07 -0700)
committerRobin Rosenberg <robin.rosenberg@dewire.com>
Thu, 14 Aug 2008 17:33:20 +0000 (14 19:33 +0200)
tree068139b095c03cd3b1c0b818c3beb6693ccab54b
parentf130e364c428e542e60cadc5336646fe44e38553
Support recreating a .git/index through DirCache

The DirCacheBuilder is meant for building up a new DirCache content
by iterating through the paths in proper Git sort order.  This is
mostly useful during a TreeWalk, where the paths are being fed to
the application in the correct sort ordering.  Appending them into
the new entry table in order avoids sorting costs later on when we
try to write the file back to disk.

The API is designed for speed, not ease-of-use.  Performing updates
in order and by copying large ranges of the existing index into the
new index is incredibly fast, but requires the application to work
harder to construct the right sequence of calls.

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/BaseDirCacheEditor.java [new file with mode: 0644]
org.spearce.jgit/src/org/spearce/jgit/dircache/DirCache.java
org.spearce.jgit/src/org/spearce/jgit/dircache/DirCacheBuilder.java [new file with mode: 0644]