From: Jeff King <peff@peff.net>
To: Junio C Hamano <gitster@pobox.com>
Cc: madmarcos <fru574@my.utsa.edu>,
Shawn Pearce <spearce@spearce.org>,
git@vger.kernel.org
Subject: Re: capturing the packfile from git-upload-pack
Date: Fri, 15 Apr 2011 15:25:19 -0400 [thread overview]
Message-ID: <20110415192519.GA5332@sigill.intra.peff.net> (raw)
In-Reply-To: <20110415190908.GA4093@sigill.intra.peff.net>
On Fri, Apr 15, 2011 at 03:09:08PM -0400, Jeff King wrote:
> On Fri, Apr 15, 2011 at 10:46:28AM -0700, Junio C Hamano wrote:
>
> > Shawn Pearce <spearce@spearce.org> writes:
> >
> > > On Thu, Apr 14, 2011 at 23:22, madmarcos <fru574@my.utsa.edu> wrote:
> > >> is there a git command that can capture in a separate file the packfile that
> > >> is generated and transmitted from a "want"ed branch during the
> > >> git-upload-pack command? I need a good sample to study.
> > >
> > > No.
> > >
> > > But you can create an input file yourself, the pkt-line format is
> > > pretty simple. Pipe the input to git-upload-pack, and it will spit
> > > back the response. :-)
> >
> > If you are running 1.7.5-rc0 or newer, GIT_TRACE_PACKET may also be of
> > help.
>
> Sadly, no. I punted on outputting the actual pack since it is big and
> binary, and I was only interested in the ref negotiation. My eventual
> plan was that you could do:
>
> GIT_TRACE_PACKET=2 GIT_TRACE_PACKET_PACK=/tmp/foo.pack \
> git clone ...
Actually, thinking on it more, this is kind of stupid. The pack that we
fetch will end up in .git/objects/pack, so it's not that interesting to
dump (though I suppose in a fetch setting, you might want to actually
peek at the thin pack before it gets resolved).
More interesting is for the sender to dump the pack they send, which
would mean instrumenting pack-objects.
Or, as Shawn suggested, poking upload-pack yourself using a conversation
you read from GIT_TRACE_PACKET. Which is probably what you meant when
you suggested it in the first place. So I'll shut up now.
-Peff
next prev parent reply other threads:[~2011-04-15 19:25 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-04-15 3:22 capturing the packfile from git-upload-pack madmarcos
2011-04-15 15:46 ` Shawn Pearce
2011-04-15 17:46 ` Junio C Hamano
2011-04-15 19:09 ` Jeff King
2011-04-15 19:25 ` Jeff King [this message]
2011-04-16 0:59 ` madmarcos
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=20110415192519.GA5332@sigill.intra.peff.net \
--to=peff@peff.net \
--cc=fru574@my.utsa.edu \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--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).