git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH 3/3] pkt-line: support tracing verbatim pack contents

From
AFAugie Fackler <augie@google.com>
Date
Jun 16, 2015, 17:14 UTC
Message-ID
<CAHcr6HYA=gpMTaJ5WOOmtEp+J4wBMz9D59fbByzsdBkPRf4CZQ@mail.gmail.com>
In-Reply-To
<20150616171005.GB18667@peff.net>
On Tue, Jun 16, 2015 at 1:10 PM, Jeff King <peff@peff.net> wrote:
Show 15 quoted lines
> On Tue, Jun 16, 2015 at 11:38:41AM -0400, Augie Fackler wrote:
>
>> > We already have a GIT_TRACE_PACKET mechanism for tracing
>> > packets. Let's extend it with GIT_TRACE_PACK to dump the
>> > verbatim packfile.
>>
>> FWIW, this also works for me - I have no preference between my patches
>> and Jeff's. I suspect yours are much better given that you have a clue
>> about git internals ;).
>
> I like mine better than yours, if only because it hooks into the
> existing tracing mechanism. But I am sad that neither of our proposals
> works for tracing pushed packs (something that is useful for the
> opposite situation: you have a sane git server, and some unknown
> misbehaving _client_ is sending you bogus packs).

Yeah, not having it for the push side is a slight bummer, but in general I haven't had problems debugging git clients pushing bogus data in the same way that I've had problems with weirdness in new server features.

>
> Here's a rough cut at the "trace stdin" idea I mentioned earlier (which
> is essentially an internal "tee"). You can collect the incoming pack
> like:

Neat, but not sure I like the extra overhead of having to grab the full trace and then reconstruct some arguments to be able to diagnose the pack. Having the verbatim pack just land on disk is really handy, because then any existing tools one has cooked up (my team has a few weird one-off ones by now) just work without extra fussing or looking up steps to reconstruct the whole file.

Previous: Jeff KingNext: Jeff King
Message 20 of 33 in “fetch-pack: optionally save packs to disk”
  1. fetch-pack: optionally save packs to diskAugie Fackler, Jun 11, 2015
  2. Johannes SixtJun 12, 2015
  3. Junio C HamanoJun 12, 2015
  4. Augie FacklerJun 12, 2015
  5. Jeff KingJun 12, 2015
  6. Jeff KingJun 12, 2015
  7. 1/3 pkt-line: simplify starts_with checks in packet tracingJeff King, Jun 12, 2015
  8. Stefan BellerJun 12, 2015
  9. 2/3 pkt-line: tighten sideband PACK check when tracingJeff King, Jun 12, 2015
  10. Stefan BellerJun 12, 2015
  11. Jeff KingJun 12, 2015
  12. Stefan BellerJun 12, 2015
  13. 3/3 pkt-line: support tracing verbatim pack contentsJeff King, Jun 12, 2015
  14. Augie FacklerJun 16, 2015
  15. Junio C HamanoJun 16, 2015
  16. Jeff KingJun 16, 2015
  17. Augie FacklerJun 16, 2015
  18. Jeff KingJun 16, 2015
  19. Jeff KingJun 16, 2015
  20. Augie FacklerJun 16, 2015
  21. Jeff KingJun 16, 2015
  22. Augie FacklerJun 16, 2015
  23. 0/3 add GIT_TRACE_STDINJeff King, Jun 16, 2015
  24. 1/3 trace: implement %p placeholder for filenamesJeff King, Jun 16, 2015
  25. 2/3 trace: add pid to each output lineJeff King, Jun 16, 2015
  26. 3/3 trace: add GIT_TRACE_STDINJeff King, Jun 16, 2015
  27. Jeff KingJun 16, 2015
  28. Jeff KingJun 16, 2015
  29. Duy NguyenJun 17, 2015
  30. Jeff KingJun 17, 2015
  31. Duy NguyenJun 18, 2015
  32. Junio C HamanoJun 26, 2015
  33. Augie FacklerJun 12, 2015

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.