Re: [PATCH v4 3/8] worktree: refactor infer_backlink return
On 20/11/2024 05:20, Caleb White wrote:
Show 18 quoted lines
> On Tue Nov 19, 2024 at 9:08 AM CST, Phillip Wood wrote:
>>> strbuf_release(&actual);
>>> - return 1;
>>> -
>>> + return inferred->len;
>>> error:
>>> strbuf_release(&actual);
>>> strbuf_reset(inferred); /* clear invalid path */
>>> - return 0;
>>> + return -1;
>>
>> Why don't we need to update the callers of this function to account for
>> the new return value?
>
> Originally this function was called inside an `if` statement, however,
> another topic extracted the call to a separate line and so this return
> was no longer used. I decided to keep the return anyway in case it was
> useful in the future.
If we don't use the return value I'd be inclined to leave it as is.
Best Wishes
Phillip
Show 5 quoted lines
>
> Best,
>
> Caleb
>