From: Junio C Hamano Date: Wed, 08 Jun 2016 23:05:10 GMT Subject: Re: [PATCH V2 3/3] strbuf: allow to use preallocated memory Message-ID: In-Reply-To: <20160608195248.GA4264@sigill.intra.peff.net> Jeff King writes: > I agree it can be confusing (especially on the output side your errors > are likely deferred until the next flush). But in this particular case, > I think it's an improvement (see the patch I just sent and its > discussion of error handling). Yes, for this one, the lifetime of the file descriptor is contained within a single function and it is straight-forward to wrap it correctly inside a FILE * via fdopen() and do the error check at the end, so I think the patch is an improvement. Will queue.