Re: [GSoC Patch v7 6/8] repo: add path.grafts with absolute and relative suffixes
- From
K Jayatheerth <jayatheerthkulkarni2005@gmail.com>
- Date
- Nov 3, 2026, 02:50 UTC
- Message-ID
- <CA+rGoLdcO94KGFg-qeUmbXHmRPz5UaOjeBd4_c_HuppquM7XTw@mail.gmail.com>
- In-Reply-To
- <aukQWTUKWwmCQwi5@denethor>
On Tue, Nov 3, 2026 at 4:17 AM Justin Tobler <jltobler@gmail.com> wrote:
Show 13 quoted lines
>
> On 26/09/27 05:14PM, K Jayatheerth wrote:
> > +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.
>Right, I am going to depend on the original error check.
Show 13 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.
>Yup, will change.
Show 10 quoted lines
> > + 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? >
Ohw, that's an interesting question. If they are being removed, then probably not including is a better choice. I remember including this because on the idea page they added this also I am a bit hazy on where but there was a discussion to include this.
> -Justin
- K Jayatheerth