On Mon, Mar 4, 2024 at 8:29 PM Eric Sunshine <sunshine@xxxxxxxxxxxxxx> wrote: > Style: Declare `resolved_gitdir_buf` along with `ret` and `gitdir`, > then have a blank line before the actual code. Thanks for the detailed style feedback. > > > } else if (err == READ_GITFILE_ERR_NOT_A_REPO) { > > - if (!(backlink = infer_backlink(realdotgit.buf))) { > > + if (!(backlink.buf = infer_backlink(realdotgit.buf))) { > > Don't do this. Never modify the internal state of strbuf directly; > consider the state read-only. Modifications should only be made via > the API. You'll need to rewrite this code a bit to make it work > correctly with the changes proposed by this patch. Good catch, I should've paid more attention in the refactoring. Fixed all of the discussed notes in v2.