From: K Jayatheerth Date: Tue, 03 Nov 2026 02:10:25 GMT Subject: Re: [GSoC Patch v7 3/8] repo: add path.superproject-root with absolute and relative suffixes Message-ID: In-Reply-To: On Tue, Nov 3, 2026 at 3:13 AM Justin Tobler wrote: > > On 26/09/27 05:14PM, K Jayatheerth wrote: > > +static int get_path_superproject_absolute(struct repository *repo, struct strbuf *buf) > > +{ > > + struct strbuf superproject = STRBUF_INIT; > > + > > + if (!get_superproject_working_tree(repo, &superproject)) { > > + strbuf_release(&superproject); > > + return 0; > > nit: The early return isn't really need here. This instead could be: > Neat, I will use it! > if (get_superproject_working_tree(repo, &superproject)) > format_path(buf, superproject.buf, "", PATH_FORMAT_CANONICAL); > > > + } > > + > > + format_path(buf, superproject.buf, "", PATH_FORMAT_CANONICAL); > > + strbuf_release(&superproject); > > + return 0; > > +} > > + > > +static int get_path_superproject_relative(struct repository *repo, struct strbuf *buf) > > +{ > > + struct strbuf superproject = STRBUF_INIT; > > + > > + if (!get_superproject_working_tree(repo, &superproject)) { > > + strbuf_release(&superproject); > > + return 0; > > Same thing here. > Sure thing. > > + } > > + > > + format_path(buf, superproject.buf, repo->prefix, PATH_FORMAT_RELATIVE); > > + strbuf_release(&superproject); > > + return 0; > > +} > > The rest of this patch looks good to me. > Thanks! - K Jayatheerth