From: Phillip Wood Date: Fri, 22 Nov 2024 16:44:45 GMT Subject: Re: [PATCH v4 3/8] worktree: refactor infer_backlink return Message-ID: <18dd2d59-aa12-4921-bd2a-2bbc0027c63c@gmail.com> In-Reply-To: On 20/11/2024 05:20, Caleb White wrote: > 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 > > Best, > > Caleb >