From: Anders Kaseorg Date: Wed, 01 Dec 2021 23:47:40 GMT Subject: Re: [PATCH v7 4/8] worktree: simplify find_shared_symref() memory ownership model Message-ID: In-Reply-To: On 12/1/21 15:10, Eric Sunshine wrote: > As far as I can see, this code only cares whether find_shared_symref() > returned a result; it doesn't actually consult the returned worktree > at all, thus it semantically considers `worktree` as a boolean, not as > a `struct worktree`. No, the update_worktree(new_oid->hash, worktree) call uses it in a non-boolean way, so we do need to keep it around. Anders