Re: [PATCH v4 1/4] refs: allow reference location in refstorage config
- From
Patrick Steinhardt <ps@pks.im>
- Date
- Feb 6, 2026, 14:33 UTC
- Message-ID
- <aYX7sYaTp6cArMxA@pks.im>
- In-Reply-To
- <20260202-kn-alternate-ref-dir-v4-1-3b30430411e3@gmail.com>
On Mon, Feb 02, 2026 at 01:26:30PM +0100, Karthik Nayak wrote:
Show 6 quoted lines
> The 'extensions.refStorage' config is used to specify the reference > backend for a given repository. Both the 'files' and 'reftable' backends > utilize the $GIT_DIR as the reference folder by default in > `get_main_ref_store()`. > > Since the reference backends are pluggable, this means that they should
s/should/could/ I guess. It's not like they are broken currently, we rather want more.
Show 9 quoted lines
> diff --git a/repository.h b/repository.h
> index 6063c4b846..c648dab196 100644
> --- a/repository.h
> +++ b/repository.h
> @@ -150,6 +150,8 @@ struct repository {
>
> /* Repository's reference storage format, as serialized on disk. */
> enum ref_storage_format ref_storage_format;
> + /* Reference storage information as needed for the backend. */Nit: it would be nice to document whether this only contains the additional data after the schema, or whether it's the whole "files:///dir" string.
Another nit: ideally, the step to pass through the payload to the backends came before this patch so that we could already make them fail in case they are passed a value they don't understand. Otherwise, a user could now pass "reftable://foobar", and the "foobar" part would be silently ignored without any kind of warning or error.
Other than that this patch looks good to me.
Patrick