Re: [PATCH V2 3/3] strbuf: allow to use preallocated memory
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Jun 8, 2016, 23:05 UTC
- Message-ID
- <xmqqtwh3jn89.fsf@gitster.mtv.corp.google.com>
- In-Reply-To
- <20160608195248.GA4264@sigill.intra.peff.net>
Jeff King <peff@peff.net> 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.