]> source.dussan.org Git - jgit.git/commit
Refactor IndexPack to not require local filesystem 52/2252/3
authorShawn O. Pearce <spearce@spearce.org>
Fri, 14 Jan 2011 22:17:55 +0000 (14:17 -0800)
committerChris Aniszczyk <caniszczyk@gmail.com>
Tue, 25 Jan 2011 22:43:06 +0000 (16:43 -0600)
commit1bf0c3cdb1aecac41284e63b2daed2d92b908d3d
tree043bcf5e081976f2fd20d958eccda60472e98825
parent51dedfdc319d51aa729f3e2801c4a06491d6ddac
Refactor IndexPack to not require local filesystem

By moving the logic that parses a pack stream from the network (or
a bundle) into a type that can be constructed by an ObjectInserter,
repository implementations have a chance to inject their own logic
for storing object data received into the destination repository.

The API isn't completely generic yet, there are still quite a few
assumptions that the PackParser subclass is storing the data onto
the local filesystem as a single file.  But its about the simplest
split of IndexPack I can come up with without completely ripping
the code apart.

Change-Id: I5b167c9cc6d7a7c56d0197c62c0fd0036a83ec6c
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Chris Aniszczyk <caniszczyk@gmail.com>
20 files changed:
org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/IndexPack.java
org.eclipse.jgit.test/tst/org/eclipse/jgit/storage/file/PackFileTest.java
org.eclipse.jgit.test/tst/org/eclipse/jgit/storage/file/PackWriterTest.java
org.eclipse.jgit.test/tst/org/eclipse/jgit/transport/IndexPackTest.java [deleted file]
org.eclipse.jgit.test/tst/org/eclipse/jgit/transport/PackParserTest.java [new file with mode: 0644]
org.eclipse.jgit.test/tst/org/eclipse/jgit/transport/ReceivePackRefFilterTest.java
org.eclipse.jgit/src/org/eclipse/jgit/lib/CoreConfig.java
org.eclipse.jgit/src/org/eclipse/jgit/lib/ObjectInserter.java
org.eclipse.jgit/src/org/eclipse/jgit/storage/file/CachedObjectDirectory.java
org.eclipse.jgit/src/org/eclipse/jgit/storage/file/FileObjectDatabase.java
org.eclipse.jgit/src/org/eclipse/jgit/storage/file/ObjectDirectory.java
org.eclipse.jgit/src/org/eclipse/jgit/storage/file/ObjectDirectoryInserter.java
org.eclipse.jgit/src/org/eclipse/jgit/storage/file/ObjectDirectoryPackParser.java [new file with mode: 0644]
org.eclipse.jgit/src/org/eclipse/jgit/transport/BasePackFetchConnection.java
org.eclipse.jgit/src/org/eclipse/jgit/transport/BundleFetchConnection.java
org.eclipse.jgit/src/org/eclipse/jgit/transport/IndexPack.java [deleted file]
org.eclipse.jgit/src/org/eclipse/jgit/transport/LongMap.java
org.eclipse.jgit/src/org/eclipse/jgit/transport/PackParser.java [new file with mode: 0644]
org.eclipse.jgit/src/org/eclipse/jgit/transport/ReceivePack.java
org.eclipse.jgit/src/org/eclipse/jgit/transport/WalkFetchConnection.java