From: Jeff King Date: Tue, 09 Dec 2014 18:49:45 GMT Subject: Re: [PATCH/RFC] doc: document error handling functions and conventions (Re: [PATCH 03/14] copy_fd: pass error message back through a strbuf) Message-ID: <20141209184944.GA31158@peff.net> In-Reply-To: On Tue, Dec 09, 2014 at 10:43:52AM -0800, Junio C Hamano wrote: > > Unless we can do something clever with a set of global error strbufs or > > something (i.e., that expand as needed, but the caller does not have to > > free themselves, as they will get recycled eventually). That has its own > > corner cases, though. > > I do share your concern that "strbuf"-approach calls for more > boilerplate leading to unmaintainable code, but I offhand do not > have a magic silver bullet for it. globals are indeed tempting, but > I'd have to say that what Jonathan has may probably be the least bad > of the possibilities. OK. I'm not sure I agree that it is the least bad, but I don't think it's worth arguing over more. Let's go with it, and you can note my objection in the captain's log. :) -Peff