Re: [PATCH v4 5/5] ref-filter: get_ref_atom_value() error handling
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Mar 21, 2018, 19:30 UTC
- Message-ID
- <xmqq4ll9p6oq.fsf@gitster-ct.c.googlers.com>
- In-Reply-To
- <CAPig+cQ0cq9-cYuw8AJpk6maeT-T25SJDhWpb4TyN8rQJmP=xg@mail.gmail.com>
Eric Sunshine <sunshine@sunshineco.com> writes:
Show 5 quoted lines
>> 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?).