{"thread":{"id":"27102","subject":"capturing the packfile from git-upload-pack","startedAt":"2011-04-15T03:22:00Z","lastAt":"2011-04-16T00:59:19Z","messageCount":6,"participants":["madmarcos","Shawn Pearce","Junio C Hamano","Jeff King"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"165875","messageId":"1302837720729-6275146.post@n2.nabble.com","threadId":"27102","inReplyTo":null,"subject":"capturing the packfile from git-upload-pack","fromName":"madmarcos","fromEmail":"fru574@my.utsa.edu","sentAt":"2011-04-15T03:22:00Z","receivedAt":"2011-04-15T03:22:00Z","isPatch":false,"sender":{"key":"fru574@my.utsa.edu","avatar":null},"body":"Hi folks,\nis there a git command that can capture in a separate file the packfile that\nis generated and transmitted from a \"want\"ed branch during the\ngit-upload-pack command? I need a good sample to study.\nthanks!\n\n--\nView this message in context: http://git.661346.n2.nabble.com/capturing-the-packfile-from-git-upload-pack-tp6275146p6275146.html\nSent from the git mailing list archive at Nabble.com.\n"},{"id":"165906","messageId":"BANLkTimAt_gcp1uBR_0H7LJHUdFGqHbRvA@mail.gmail.com","threadId":"27102","inReplyTo":"1302837720729-6275146.post@n2.nabble.com","subject":"Re: capturing the packfile from git-upload-pack","fromName":"Shawn Pearce","fromEmail":"spearce@spearce.org","sentAt":"2011-04-15T15:46:44Z","receivedAt":"2011-04-15T15:46:44Z","isPatch":false,"sender":{"key":"spearce@spearce.org","avatar":"https://avatars.githubusercontent.com/u/34844?v=4"},"body":"On Thu, Apr 14, 2011 at 23:22, madmarcos <fru574@my.utsa.edu> wrote:\n> is there a git command that can capture in a separate file the packfile that\n> is generated and transmitted from a \"want\"ed branch during the\n> git-upload-pack command? I need a good sample to study.\n\nNo.\n\nBut you can create an input file yourself, the pkt-line format is\npretty simple. Pipe the input to git-upload-pack, and it will spit\nback the response. :-)\n\n-- \nShawn.\n"},{"id":"165913","messageId":"7vy63bcsqz.fsf@alter.siamese.dyndns.org","threadId":"27102","inReplyTo":"BANLkTimAt_gcp1uBR_0H7LJHUdFGqHbRvA@mail.gmail.com","subject":"Re: capturing the packfile from git-upload-pack","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2011-04-15T17:46:28Z","receivedAt":"2011-04-15T17:46:28Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Shawn Pearce <spearce@spearce.org> writes:\n\n> On Thu, Apr 14, 2011 at 23:22, madmarcos <fru574@my.utsa.edu> wrote:\n>> is there a git command that can capture in a separate file the packfile that\n>> is generated and transmitted from a \"want\"ed branch during the\n>> git-upload-pack command? I need a good sample to study.\n>\n> No.\n>\n> But you can create an input file yourself, the pkt-line format is\n> pretty simple. Pipe the input to git-upload-pack, and it will spit\n> back the response. :-)\n\nIf you are running 1.7.5-rc0 or newer, GIT_TRACE_PACKET may also be of\nhelp.\n"},{"id":"165922","messageId":"20110415190908.GA4093@sigill.intra.peff.net","threadId":"27102","inReplyTo":"7vy63bcsqz.fsf@alter.siamese.dyndns.org","subject":"Re: capturing the packfile from git-upload-pack","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2011-04-15T19:09:08Z","receivedAt":"2011-04-15T19:09:08Z","isPatch":false,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Fri, Apr 15, 2011 at 10:46:28AM -0700, Junio C Hamano wrote:\n\n> Shawn Pearce <spearce@spearce.org> writes:\n> \n> > On Thu, Apr 14, 2011 at 23:22, madmarcos <fru574@my.utsa.edu> wrote:\n> >> is there a git command that can capture in a separate file the packfile that\n> >> is generated and transmitted from a \"want\"ed branch during the\n> >> git-upload-pack command? I need a good sample to study.\n> >\n> > No.\n> >\n> > But you can create an input file yourself, the pkt-line format is\n> > pretty simple. Pipe the input to git-upload-pack, and it will spit\n> > back the response. :-)\n> \n> If you are running 1.7.5-rc0 or newer, GIT_TRACE_PACKET may also be of\n> help.\n\nSadly, no. I punted on outputting the actual pack since it is big and\nbinary, and I was only interested in the ref negotiation. My eventual\nplan was that you could do:\n\n  GIT_TRACE_PACKET=2 GIT_TRACE_PACKET_PACK=/tmp/foo.pack \\\n    git clone ...\n\nand get the ref negotiation on stderr, and the pack dumped in a file.\nHowever, there is one stumbling block: the packet tracing happens at a\nvery low level, and doesn't know if we are doing sideband-demuxing or\nnot. And it would need to know to that to put the proper data in the\npackfile.\n\nIt may just be a matter of implementing the packfile tracing at a\nslightly different layer (where we have already demuxed), but I haven't\nlooked closely at it.\n\n-Peff\n"},{"id":"165924","messageId":"20110415192519.GA5332@sigill.intra.peff.net","threadId":"27102","inReplyTo":"20110415190908.GA4093@sigill.intra.peff.net","subject":"Re: capturing the packfile from git-upload-pack","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2011-04-15T19:25:19Z","receivedAt":"2011-04-15T19:25:19Z","isPatch":false,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Fri, Apr 15, 2011 at 03:09:08PM -0400, Jeff King wrote:\n\n> On Fri, Apr 15, 2011 at 10:46:28AM -0700, Junio C Hamano wrote:\n> \n> > Shawn Pearce <spearce@spearce.org> writes:\n> > \n> > > On Thu, Apr 14, 2011 at 23:22, madmarcos <fru574@my.utsa.edu> wrote:\n> > >> is there a git command that can capture in a separate file the packfile that\n> > >> is generated and transmitted from a \"want\"ed branch during the\n> > >> git-upload-pack command? I need a good sample to study.\n> > >\n> > > No.\n> > >\n> > > But you can create an input file yourself, the pkt-line format is\n> > > pretty simple. Pipe the input to git-upload-pack, and it will spit\n> > > back the response. :-)\n> > \n> > If you are running 1.7.5-rc0 or newer, GIT_TRACE_PACKET may also be of\n> > help.\n> \n> Sadly, no. I punted on outputting the actual pack since it is big and\n> binary, and I was only interested in the ref negotiation. My eventual\n> plan was that you could do:\n> \n>   GIT_TRACE_PACKET=2 GIT_TRACE_PACKET_PACK=/tmp/foo.pack \\\n>     git clone ...\n\nActually, thinking on it more, this is kind of stupid. The pack that we\nfetch will end up in .git/objects/pack, so it's not that interesting to\ndump (though I suppose in a fetch setting, you might want to actually\npeek at the thin pack before it gets resolved).\n\nMore interesting is for the sender to dump the pack they send, which\nwould mean instrumenting pack-objects.\n\nOr, as Shawn suggested, poking upload-pack yourself using a conversation\nyou read from GIT_TRACE_PACKET. Which is probably what you meant when\nyou suggested it in the first place. So I'll shut up now.\n\n-Peff\n"},{"id":"165942","messageId":"1302915559826-6278064.post@n2.nabble.com","threadId":"27102","inReplyTo":"BANLkTimAt_gcp1uBR_0H7LJHUdFGqHbRvA@mail.gmail.com","subject":"Re: capturing the packfile from git-upload-pack","fromName":"madmarcos","fromEmail":"fru574@my.utsa.edu","sentAt":"2011-04-16T00:59:19Z","receivedAt":"2011-04-16T00:59:19Z","isPatch":false,"sender":{"key":"fru574@my.utsa.edu","avatar":null},"body":"Thanks, Shawn. Worked like a charm. Sometimes I forget the awesomeness that\nis Unix.\n\n--\nView this message in context: http://git.661346.n2.nabble.com/capturing-the-packfile-from-git-upload-pack-tp6275146p6278064.html\nSent from the git mailing list archive at Nabble.com.\n"}]}