Subject: Re: [PATCH v7 5/6] refs: allow reference location in refstorage config

From: Toon Claes <[email-masked]>
Date: Fri, 20 Feb 2026 16:36:58 +0100

Karthik Nayak <[email-masked]> writes:

> diff --git a/setup.c b/setup.c
> index 1fc9ae3872..d407f3347b 100644
> --- a/setup.c
> +++ b/setup.c
> @@ -632,6 +632,21 @@ static enum extension_result handle_extension_v0(const char *var,
>  		return EXTENSION_UNKNOWN;
>  }
>  
> +static void parse_reference_uri(const char *value, char **format,
> +				char **payload)
> +{
> +	const char *schema_end;
> +
> +	schema_end = strstr(value, "://");
> +	if (!schema_end) {
> +		*format = xstrdup(value);
> +		*payload = NULL;
> +	} else {
> +		*format = xstrndup(value, schema_end - value);
> +		*payload = xstrdup_or_null(schema_end + 3);

Also here, why did you put the negated condition in the if clause?

> +	}
> +}
> +

-- 
Cheers,
Toon