🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: linux.kernel.git
2 messages
2 total messages Started by Justin Tobler Mon, 02 Nov 2026 22:47
Re: [GSoC Patch v7 6/8] repo: add path.grafts with absolute and relative suffixes
#2194
Author: Justin Tobler
Date: Mon, 02 Nov 2026 22:47
37 lines
11780 bytes
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.

> +	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
Re: [GSoC Patch v7 6/8] repo: add path.grafts with absolute and relative suffixes
#2210
Author: K Jayatheerth
Date: Tue, 03 Nov 2026 02:50
56 lines
13576 bytes
On Tue, Nov 3, 2026 at 4:17 AM Justin Tobler <jltobler@gmail.com> wrote:
>
> 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.

> > +     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.

> > +     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
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads