Re: git pack/unpack over bittorrent - works!

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, 2 Sep 2010, Jeff King wrote:

> 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.

I would go as far as stating that this is never guaranteed by design.  
And I will oppose any attempt to introduce such restrictions as this 
will only prevent future enhancements to packing heuristics.

For example, right now you already can't rely on having the exact same 
pack output even on the same machine using the same arguments and the 
same inputs simply by using threads.  As soon as you're using more than 
one thread (most people do these days) then your pack output becomes non 
deterministic.


Nicolas

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]