From: Jeff King Date: Thu, 02 Sep 2010 15:58:13 GMT Subject: Re: git pack/unpack over bittorrent - works! Message-ID: <20100902155810.GB14508@sigill.intra.peff.net> In-Reply-To: On Thu, Sep 02, 2010 at 04:42:55PM +0100, Luke Kenneth Casson Leighton wrote: > >>  it seems to be.  as long as each version of git produces the exact > >> same pack object, off of the command "git pack-objects --all --stdout > >> --thin {ref}<  {objref}" > > > > This is not guaranteed. > [...] > * under what circumstances is it not guaranteed? and, crucially, is > it necessary to care? i.e. if someone does a shallow git clone, i > couldn't give a stuff. pack-objects will reuse previously found deltas. So the deltas you have in your existing packs matter. The deltas you have in your existing packs depend on many things. At least: 1. Options you used when packing (e.g., --depth and --window). 2. Probably exactly _when_ you packed. You could find a good delta from A to B. Later, object C comes into existence, and would provide a better delta base for B. I don't think we will ever try A against C, unless --no-reuse-delta is set. You have a different pack than somebody who packed after A, B, and C all existed. In practice, this tends not to happen much because the best deltas are usually going backwards in time to a previous version. But it can happen. -Peff