Subject: Re: Are binary xdeltas only used if you use git-gc?

From: Jean-Luc Herren <[email-masked]>
Date: Fri, 31 Oct 2008 18:03:18 +0100

Jakub Narebski wrote:
> "Thanassis Tsiodras" <[email-masked]> writes:
>> Then again, I must confess I only did the git-gc after I pushed.
>> Does the git-push actually take advantage of the similarities only if
>> I do a git-gc first?
> 
> Git does deltification _only_ in packfiles. But when you push via SSH
> git would generate a pack file with commits the other side doesn't
> have, and those packs are thin packs, so they also have deltas...

AFAICT, git stopped pushing thin packs by default with 1.5.3.2, so
you have to explicitely ask for it.  The original poster might not
be clear about this (or even know what a thin pack is).

Thanassis, try to use "git push --thin".  'man git-push' says:

  --thin, --no-thin
      These options are passed to git-send-pack. Thin transfer spends
      extra cycles to minimize the number of objects to be sent and meant
      to be used on slower connection.

I did a quick test with big random files and it indeed only sends
small deltas on small changes, but if you don't pass --thin, it
will send the full objects.

I didn't find a configuration variable to change that default.  It
would make sense for people that regularly push over slow lines.

Hope this helps,
jlh