Enable ofs-delta during send-pack/receive-pack protocol
commite7e386cd2179b21ac7fa4ae29550c5857618e89e
authorShawn O. Pearce <spearce@spearce.org>
Fri, 1 May 2009 21:56:08 +0000 (1 14:56 -0700)
committerRobin Rosenberg <robin.rosenberg@dewire.com>
Mon, 4 May 2009 22:42:15 +0000 (5 00:42 +0200)
tree103b6a630724b3f690f673c5aec9af21181da8ec
parent2ec04643f09244e3cc49a35a4326a90d6d40c384
Enable ofs-delta during send-pack/receive-pack protocol

In "allow OFS_DELTA objects during a push" Nicolas Pitre taught C
git how to enable OBJ_OFS_DELTA usage in a pack file created on a
client, to be processed by receive-pack on the server side.

This creates a smaller pack file during transfer, as the OFS_DELTA
format uses less per-delta header space than the classical REF_DELTA.
If the receiving peer is going to just store the pack to disk,
this would also produce a smaller on-disk pack file.

In his change, Nico tied the server side enablement of the capability
to the server's repack.usedeltabaseoffset setting, which can be
set to false in a repository that needs to service direct access
clients that are old to understand OFS_DELTA.  We do the same here
in JGit to match semantics.

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/transport/BasePackPushConnection.java
org.spearce.jgit/src/org/spearce/jgit/transport/ReceivePack.java