Re: [GSoC Patch v7 6/8] repo: add path.grafts with absolute and relative suffixes
- From
Justin Tobler <jltobler@gmail.com>
- Date
- Nov 2, 2026, 22:47 UTC
- Message-ID
- <aukQWTUKWwmCQwi5@denethor>
- In-Reply-To
- <20260927114420.59724-7-jayatheerthkulkarni2005@gmail.com>
On 26/09/27 05:14PM, K Jayatheerth wrote:
Show 6 quoted lines
> +static int get_path_grafts_absolute(struct repository *repo, struct strbuf *buf)
> +{
> + const char *graft_file = repo_get_graft_file(repo);
> +
> + if (!graft_file)
> + return error(_("unable to get graft file"));nit: Similar to Junio's comment on the previous patch in the previous version, `repo_get_graph_file()` already BUGs if `graft_file` is NULL, so the error isn't really doing anything here.
Show 10 quoted lines
> + format_path(buf, graft_file, "", PATH_FORMAT_CANONICAL);
> + return 0;
> +}
> +
> +static int get_path_grafts_relative(struct repository *repo, struct strbuf *buf)
> +{
> + const char *graft_file = repo_get_graft_file(repo);
> +
> + if (!graft_file)
> + return error(_("unable to get graft file"));Same here.
> + format_path(buf, graft_file, repo->prefix, PATH_FORMAT_RELATIVE); > + return 0; > +}
The rest of this patch looks fine, but I do wonder if it really makes sense to include this patch at all because graphs are deprecated feature and also slated for removal in "Documentation/BreakingChanges.adoc".
Maybe we should just drop this patch?
-Justin