Thread (3 messages) flat view 3 messages, 2 authors, 2016-06-15

Re: capturing the packfile from git-upload-pack

From: Jeff King <hidden>
Date: 2016-06-15 22:51:03

On Fri, Apr 15, 2011 at 10:46:28AM -0700, Junio C Hamano wrote:
Shawn Pearce [off-list ref] writes:
quoted
On Thu, Apr 14, 2011 at 23:22, madmarcos [off-list ref] wrote:
quoted
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 ...

and get the ref negotiation on stderr, and the pack dumped in a file.
However, there is one stumbling block: the packet tracing happens at a
very low level, and doesn't know if we are doing sideband-demuxing or
not. And it would need to know to that to put the proper data in the
packfile.

It may just be a matter of implementing the packfile tracing at a
slightly different layer (where we have already demuxed), but I haven't
looked closely at it.

-Peff
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help