From: Justin Tobler Date: Mon, 02 Nov 2026 21:43:20 GMT Subject: Re: [GSoC Patch v7 3/8] repo: add path.superproject-root with absolute and relative suffixes Message-ID: In-Reply-To: <20260927114420.59724-4-jayatheerthkulkarni2005@gmail.com> 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: 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. > + } > + > + format_path(buf, superproject.buf, repo->prefix, PATH_FORMAT_RELATIVE); > + strbuf_release(&superproject); > + return 0; > +} The rest of this patch looks good to me. -Justin