Re: [RFCv2 05/16] remote.h: Change get_remote_heads return to void
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Jun 2, 2015, 21:41 UTC
- Message-ID
- <xmqq4mmp23go.fsf@gitster.dls.corp.google.com>
- In-Reply-To
- <CAGZ79kbuwT_Wd099fys7Dz8y3ckC7pXk-qV4xe=1w4rXhMwRQg@mail.gmail.com>
Stefan Beller <sbeller@google.com> writes:
Show 13 quoted lines
> On Tue, Jun 2, 2015 at 2:17 PM, Junio C Hamano <gitster@pobox.com> wrote: >> Stefan Beller <sbeller@google.com> writes: >> >>> No function uses the return value of get_remote_heads, so we don't want >>> to confuse readers by it. >>> >>> Signed-off-by: Stefan Beller <sbeller@google.com> >>> --- >> >> This is somewhat a sad change, as the returned value is designed to >> be useful if caller wants to continue appending to the list. > > But there are no callers since like 2005. ;)
That is not a good excuse when it comes to the API design to deal with linked lists in a bog-standard way, though. Many callers of commit_list_insert() may ignore its return values, but even when the last caller stopped caring it, that does not necessarily mean the feature can be removed.