From: Junio C Hamano Date: Mon, 09 Mar 2026 14:48:16 GMT Subject: Re: [PATCH v1 1/2] worktree: do not pass strbuf by value Message-ID: In-Reply-To: <20260308180359.31188-2-deveshigurgaon@gmail.com> Deveshi Dwivedi writes: > The function only needs the string values, not the strbuf machinery. > Switch it to take const char * and update all callers to pass .buf. Makes perfect sense. Thanks for noticing and fixing these. > - write_worktree_linking_files(dotgit, gitdir, use_relative_paths); > + write_worktree_linking_files(dotgit.buf, gitdir.buf, use_relative_paths); > ... > -void write_worktree_linking_files(struct strbuf dotgit, struct strbuf gitdir, > +void write_worktree_linking_files(const char *dotgit, const char *gitdir, > int use_relative_paths) > { This updated function signature makes it plenty clear that the function does not modify anything in gitdir, so the caller shouldn't be affected. Nice.