diff options
author | Dave Borowitz <dborowitz@google.com> | 2013-05-01 10:20:31 -0700 |
---|---|---|
committer | Shawn Pearce <spearce@spearce.org> | 2014-08-13 10:27:12 -0700 |
commit | e1856dbf44a91112e6b2a5d185128f46fe0d8116 (patch) | |
tree | de097c2ef5fbbc0517d4880e526902062b2213ef /org.eclipse.jgit/resources | |
parent | 63eb9042a4b7e71c4ff0bbea7005cf453c2b9df9 (diff) | |
download | jgit-e1856dbf44a91112e6b2a5d185128f46fe0d8116.tar.gz jgit-e1856dbf44a91112e6b2a5d185128f46fe0d8116.zip |
Add a method to ObjectInserter to read back inserted objects
In the DFS implementation, flushing an inserter writes a new pack to
the storage system and is potentially very slow, but was the only way
to ensure previously-inserted objects were available. For some tasks,
like performing a series of three-way merges, the total size of all
inserted objects may be small enough to avoid flushing the in-memory
buffered data.
DfsOutputStream already provides a read method to read back from the
not-yet-flushed data, so use this to provide an ObjectReader in the
DFS case.
In the file-backed case, objects are written out loosely on the fly,
so the implementation can just return the existing WindowCursor.
Change-Id: I454fdfb88f4d215e31b7da2b2a069853b197b3dd
Diffstat (limited to 'org.eclipse.jgit/resources')
-rw-r--r-- | org.eclipse.jgit/resources/org/eclipse/jgit/internal/storage/dfs/DfsText.properties | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/org.eclipse.jgit/resources/org/eclipse/jgit/internal/storage/dfs/DfsText.properties b/org.eclipse.jgit/resources/org/eclipse/jgit/internal/storage/dfs/DfsText.properties index 2c4bd06a33..4bbc4cc71a 100644 --- a/org.eclipse.jgit/resources/org/eclipse/jgit/internal/storage/dfs/DfsText.properties +++ b/org.eclipse.jgit/resources/org/eclipse/jgit/internal/storage/dfs/DfsText.properties @@ -1,4 +1,6 @@ cannotReadIndex=Cannot read index {0} +cannotReadBackDelta=Cannot read delta type {0} shortReadOfBlock=Short read of block at {0} in pack {1}; expected {2} bytes, received only {3} shortReadOfIndex=Short read of index {0} +unexpectedEofInPack=Unexpected EOF in partially created pack willNotStoreEmptyPack=Cannot store empty pack |