Refactor pack index writing to a common API
commit011734c91039ac0d8094ec50708a5794713119f3
authorShawn O. Pearce <spearce@spearce.org>
Tue, 24 Jun 2008 02:10:03 +0000 (23 22:10 -0400)
committerRobin Rosenberg <robin.rosenberg@dewire.com>
Sat, 28 Jun 2008 10:11:52 +0000 (28 12:11 +0200)
treec649ccecb3cf5b51e3356311bd581cc4f88514df
parentb0743f1d6594e1a7677f60c3e6dcc5dd1c0e104d
Refactor pack index writing to a common API

To repack a repository or to push a pack file over a dumb transport
we need to create a .idx file to match the .pack.  This means
the index writing features of transport.IndexPack are needed by
PackWriter, and/or dumb protocol transports.

This refactoring creates a PackIndexWriter class structure that
mirrors the PackIndex (reader) structure we already have in place
for PackIndexV1 and PackIndexV2.

At present only PackIndexV1 is supported as we do not have access
to the CRC data necessary to write PackIndexV2 style files.

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/lib/PackIndexWriter.java [new file with mode: 0644]
org.spearce.jgit/src/org/spearce/jgit/lib/PackIndexWriterV1.java [new file with mode: 0644]
org.spearce.jgit/src/org/spearce/jgit/transport/IndexPack.java