From: Junio C Hamano Date: Wed, 21 Mar 2018 19:30:45 GMT Subject: Re: [PATCH v4 5/5] ref-filter: get_ref_atom_value() error handling Message-ID: In-Reply-To: Eric Sunshine writes: >> I have no idea what strbuf_error() that does not take any strbuf is >> doing,... > > strbuf_error() was a possibility proposed in [1], and it does take a > strbuf. Failure to pass in a strbuf here is just a typo. I've seen it; I just thought it was a joke and not a serious suggestion. A macro or helper function that is local to the file might be OK, but I do not think "strbuf_error()" is a useful abstraction that is generic enough in the first place (the questions to ask yourself to think about it are: Why should it be limited to return -1? Why should it be limited to always do the addf() to a strbuf?).