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

Re: [PATCH] usage: try harder to format very long error messages

From
Jeff King <peff@peff.net>
Date
Aug 11, 2015, 18:05 UTC
Message-ID
<20150811180524.GB15521@sigill.intra.peff.net>
In-Reply-To
<xmqqtws5ss14.fsf@gitster.dls.corp.google.com>
On Tue, Aug 11, 2015 at 09:34:31AM -0700, Junio C Hamano wrote:
Show 7 quoted lines
> > As for vwritef, it exists solely to work over write(), _and_ it doesn't
> > get the "one-shot" thing right (which is probably OK, as we use it only
> > when exec fails). But we could probably teach run-command to fdopen(),
> > and get rid of it entirely (in favor of teaching vreportf to take a
> > FILE* handle instead of assuming stderr).
> 
> Sounds like a plan ;-)

So here's an alternative series that does this, along with the single-fprintf thing I mentioned. The first patch is actually orthogonal to the second; we would probably want it whichever path we choose to fix vreportf's truncation (I'd just have to rebase the earlier patch on top of it if we go that route).

  [1/2]: vreportf: report to arbitrary filehandles
  [2/2]: vreportf: avoid intermediate buffer
-Peff
Previous: Junio C HamanoNext: Jeff King
Message 5 of 7 in “usage: try harder to format very long error messages”
  1. usage: try harder to format very long error messagesJeff King, Aug 11, 2015
  2. Stefan BellerAug 11, 2015
  3. Jeff KingAug 11, 2015
  4. Junio C HamanoAug 11, 2015
  5. Jeff KingAug 11, 2015
  6. 1/2 vreportf: report to arbitrary filehandlesJeff King, Aug 11, 2015
  7. 2/2 vreportf: avoid intermediate bufferJeff King, Aug 11, 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.