Re: [GSoC Patch v7 3/8] repo: add path.superproject-root with absolute and relative suffixes
On 26/09/27 05:14PM, K Jayatheerth wrote:
Show 7 quoted lines
> +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);Show 14 quoted lines
> + }
> +
> + 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;Show 6 quoted lines
> + }
> +
> + 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