From: Junio C Hamano Date: Wed, 08 Jun 2016 18:07:53 GMT Subject: Re: [PATCH V2 3/3] strbuf: allow to use preallocated memory Message-ID: In-Reply-To: <575845D9.2010604@alum.mit.edu> Michael Haggerty writes: > * It's a little less manual bookkeeping, and thus less error-prone, > than the current code. > > * If somebody decides to add another character to the line but > forgets to increase the allocation size, the code dies in testing > rather than (a) overflowing the buffer, like the current > code, or (b) silently becoming less performant, as if it used a > preallocated but non-fixed strbuf. Yeah, thanks. A relization of pretty much the same came to me after I wrote my last message on this topic. The above two are attractive.