Simplified implementation of pack creation: PackWriter
This class is able to create a pack basing on provided objects
specification and options.
The core unimplemented feature comparing to the original
git-pack-objects is windowed delta searching algorithm (and needed
binary delta between 2 files).
This implementation can create an always correct pack, with
appropriate objects set and optimized order (as in original git).
Objects are written as whole objects or deltas to another objects (ref
or offset). Existing deltas and objects may be reused if set writer is
set up accordingly. Thin-packs and delta-depth options are also
supported.
Comparing to the original implementation, delta reuse is performed in a
slightly different way - allowing delta-chains longer than 2.
Delta-depth and delta-cycles are checked on-line when writing out
objects. These changes were introduced (possibly temporary) to give us
sensible pack creation implementation without binary delta generation
algorithm which is not yet implemented.
Mentored-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Marek Zawirski <marek.zawirski@gmail.com>
Signed-off-by: Robin Rosenberg <robin.rosenberg@dewire.com>