Thread View: linux.kernel.git
2 messages
2 total messages
Started by Justin Tobler
Mon, 02 Nov 2026 21:43
Re: [GSoC Patch v7 3/8] repo: add path.superproject-root with absolute and relative suffixes
Author: Justin Tobler
Date: Mon, 02 Nov 2026 21:43
Date: Mon, 02 Nov 2026 21:43
42 lines
11771 bytes
11771 bytes
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
Re: [GSoC Patch v7 3/8] repo: add path.superproject-root with absolute and relative suffixes
Author: K Jayatheerth
Date: Tue, 03 Nov 2026 02:10
Date: Tue, 03 Nov 2026 02:10
57 lines
13322 bytes
13322 bytes
On Tue, Nov 3, 2026 at 3:13 AM Justin Tobler <jltobler@gmail.com> wrote:
>
> 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:
>
Neat, I will use it!
> 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.
>
Sure thing.
> > + }
> > +
> > + format_path(buf, superproject.buf, repo->prefix, PATH_FORMAT_RELATIVE);
> > + strbuf_release(&superproject);
> > + return 0;
> > +}
>
> The rest of this patch looks good to me.
>
Thanks!
- 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