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