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

Re: [PATCH v6 1/2] http.c: implement the GIT_TRACE_CURL environment variable

From
Jeff King <peff@peff.net>
Date
May 26, 2016, 04:51 UTC
Message-ID
<20160526045105.GC6756@sigill.intra.peff.net>
In-Reply-To
<xmqqlh34cvmd.fsf@gitster.mtv.corp.google.com>
On Fri, May 20, 2016 at 01:39:06PM -0700, Junio C Hamano wrote:
Show 14 quoted lines
> > +{
> > +	size_t i;
> > +	struct strbuf out = STRBUF_INIT;
> > +	unsigned int width = 80;
> 
> In a few places Git limits the width of the output, like using function
> name in hunk header lines and drawing diffstat in "diff --stat", we
> do default to limit the total width to 80 display columns.
> 
> Given that this routine prefixes each and every line with a short
> heading like "=> Send header: " that costs at around 15-20 columns,
> and the loop we see below only counts the true payload without
> counting the heading, you would probably want to reduce this
> somewhat so that the whole thing would fit within 80 columns.

I think that may be a losing battle. Remember that we are getting the usual trace header on top of this, which I think leaves only about 20 characters for actual data on each line.

I kind of doubt people will manually read the body data. In my experience, debugging git-over-http you want either:

  1. Just the request/response headers to see what was said.
  2. A complete dump of each body with no other formatting (e.g., so you
     can replay it with curl).

This trace output gives you (1). You can in theory generate (2) from it with a perl snippet, but the non-printing characters have been irreversibly transformed.

So I dunno. I do not mind having the body stuff there for completeness, but I doubt I'd use it myself. And I don't care much either way about how long its lines are.

-Peff
Previous: Junio C HamanoNext: Elia Pinto
Message 4 of 5 in “Implement the GIT_TRACE_CURL environment variable”
  1. 0/2 Implement the GIT_TRACE_CURL environment variableElia Pinto, May 20, 2016
  2. 1/2 http.c: implement the GIT_TRACE_CURL environment variableElia Pinto, May 20, 2016
  3. Junio C HamanoMay 20, 2016
  4. Jeff KingMay 26, 2016
  5. 2/2 imap-send.c: introduce the GIT_TRACE_CURL enviroment variableElia Pinto, May 20, 2016

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.