Support a simplified model of editing index entries
commitab1d8150b820833d796273cffe4bb0aa2a38bc3d
authorShawn O. Pearce <spearce@spearce.org>
Tue, 12 Aug 2008 01:08:02 +0000 (11 18:08 -0700)
committerRobin Rosenberg <robin.rosenberg@dewire.com>
Thu, 14 Aug 2008 17:33:20 +0000 (14 19:33 +0200)
treeeb84c33ea63d9e57d3f2d6c3b96c69a0956f83c2
parent76ed0b762e82fef07e75f50e02e201903d2829f8
Support a simplified model of editing index entries

Some applications may find using DirCacheBuilder difficult and/or just
impossible, as it requires inserting entries in order to have any sort
of good performance.

DirCacheEditor tries to bridge that gap by allowing applications to
insert edit commands out-of-order, then merge-sorts those edits onto
the index entry list from the DirCache.  Since the edit list is likely
to be shorter than the index entry list sorting the edit list and doing
a merge-sort onto the index entry list allows for large range copies in
the regions that are not modified.

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