From: Nicolas Pitre <nico@cam.org>
To: Junio C Hamano <junkio@cox.net>
Cc: Shawn Pearce <spearce@spearce.org>, git@vger.kernel.org
Subject: Re: [PATCH] Teach receive-pack how to keep pack files when unpacklooseobjects = 0.
Date: Mon, 30 Oct 2006 23:08:56 -0500 (EST) [thread overview]
Message-ID: <Pine.LNX.4.64.0610302258400.11384@xanadu.home> (raw)
In-Reply-To: <7vlkmxtmln.fsf@assigned-by-dhcp.cox.net>
On Mon, 30 Oct 2006, Junio C Hamano wrote:
> One thing you can cheaply do is to tell the number of new
> commits that is coming to receive-pack from send-pack when it
> sends the old..new pairs before it sends the packfile payload.
> It would be just a single internal rev-list call inside
> send-pack, which is reasonably cheap.
Well, it could even be avoided.
> If the receiving end knows how to process that new information
> (invent a "send-count" protocol extension and send it just like
> we already send "report-status" request), send one extra packet
> after flushing the list of old..new from send-pack to
> receive-pack, to tell what the number of commits are, and make a
> matching change in receive-pack.
I don't like this much since a commit can carry along very little or
very large amount of objects. You really want to decide on the number
of objects.
Why not just parse the pack header in receive-pack / fetch-pack, and
decide on the first-hand information? Sure the pack header is then
gone, but then the only thing that is needed is an extra flag to both
unpack-objects and index-pack to tell them that we've already parsed the
pack header and that the pack version is x and the number of objects is
y. Simply something like --pack_header=x,y. No protocol extension
needed, no extra rev-list, no reliance on the remote server providing
the needed info.
next prev parent reply other threads:[~2006-10-31 4:09 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-10-30 22:36 [PATCH] Teach receive-pack how to keep pack files when unpacklooseobjects = 0 Shawn Pearce
2006-10-30 23:04 ` Junio C Hamano
2006-10-31 6:33 ` Shawn Pearce
2006-10-30 23:23 ` Junio C Hamano
2006-10-31 4:08 ` Nicolas Pitre [this message]
2006-10-31 4:54 ` Junio C Hamano
2006-10-31 6:39 ` Shawn Pearce
2006-10-31 6:52 ` Junio C Hamano
2006-10-31 6:56 ` Shawn Pearce
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Pine.LNX.4.64.0610302258400.11384@xanadu.home \
--to=nico@cam.org \
--cc=git@vger.kernel.org \
--cc=junkio@cox.net \
--cc=spearce@spearce.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).