Re: [PATCH v4 10/12] refs: implement removal of ref storages
Jeff King <peff@peff.net> writes:
Show 8 quoted lines
> If removing either of the directories fails, we set ret to "-1". Make
> sense. But...
>
>> + ret = for_each_root_ref(refs, remove_one_root_ref, &data);
>> + if (ret < 0)
>> + ret = -1;
>
> ...then we unconditionally overwrite it, forgetting the earlier error.
Show 7 quoted lines
> Is that a mistake, or are we normalizing other negative values? Maybe
> just:
>
> if (for_each_root_ref(refs, remove_one_root_ref, &data) < 0)
> ret = -1;
>
> would work?
Sounds sensible.
Thanks for carefully reading.