Re: [PATCH v2 16/21] refs: check submodules ref storage config
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Jan 13, 2016, 17:02 UTC
- Message-ID
- <xmqqtwmhpg4j.fsf@gitster.mtv.corp.google.com>
- In-Reply-To
- <1452702766.16226.0.camel@twopensource.com>
David Turner <dturner@twopensource.com> writes:
Show 11 quoted lines
>> > +static int submodule_backend(const char *key, const char *value,
>> > void *data)
>> > +{
>> > + char **path = data;
>> > + if (!strcmp(key, "extensions.refstorage"))
>> > + *path = xstrdup(value);
>> > +}
>>
>> This should return "int" (namely 0).
>
> Fixed, thanks.By the way, I initially thought "this function should return void", until I realized that this is a callback function that is required to have a fixed function signature. It would save future readers a similar confusion if it is named with "config" somewhere and/or "_cb" at the end.
Thanks.