Re: [PATCH] pack-objects: do not reuse packfiles without --delta-base-offset

2014-04-07 Thread Junio C Hamano
Jeff King p...@peff.net writes: On Fri, Apr 04, 2014 at 03:28:48PM -0700, Junio C Hamano wrote: ... OK, together with the fact that only ancient versions of fetcher would trigger this do not reuse codepath, I agree that we should go the simplest route this patch takes. By the way, we may

Re: [PATCH] pack-objects: do not reuse packfiles without --delta-base-offset

2014-04-04 Thread Jeff King
On Wed, Apr 02, 2014 at 10:39:13AM -0700, Junio C Hamano wrote: However, it's possible that the other side cannot read our packfile verbatim. For example, we may have objects stored as OFS_DELTA, but the client is an antique version of git that only understands REF_DELTA. We negotiate

Re: [PATCH] pack-objects: do not reuse packfiles without --delta-base-offset

2014-04-04 Thread Junio C Hamano
Jeff King p...@peff.net writes: We could convert OFS_DELTA to REF_DELTA on the fly. That _may_ have a performance impact. Right now, we are basically doing the equivalent of sendfile(), and conversion would involve iterating through each object and examining the header. I think that's

Re: [PATCH] pack-objects: do not reuse packfiles without --delta-base-offset

2014-04-04 Thread Jeff King
On Fri, Apr 04, 2014 at 03:28:48PM -0700, Junio C Hamano wrote: Jeff King p...@peff.net writes: We could convert OFS_DELTA to REF_DELTA on the fly. That _may_ have a performance impact. Right now, we are basically doing the equivalent of sendfile(), and conversion would involve iterating

[PATCH] pack-objects: do not reuse packfiles without --delta-base-offset

2014-04-02 Thread Jeff King
When we are sending a packfile to a remote, we currently try to reuse a whole chunk of packfile without bothering to look at the individual objects. This can make things like initial clones much lighter on the server, as we can just dump the packfile bytes. However, it's possible that the other

Re: [PATCH] pack-objects: do not reuse packfiles without --delta-base-offset

2014-04-02 Thread Junio C Hamano
Jeff King p...@peff.net writes: When we are sending a packfile to a remote, we currently try to reuse a whole chunk of packfile without bothering to look at the individual objects. This can make things like initial clones much lighter on the server, as we can just dump the packfile bytes.