Re: [PATCH v4 1/4] refs: allow reference location in refstorage config
- From
Karthik Nayak <karthik.188@gmail.com>
- Date
- Feb 9, 2026, 12:25 UTC
- Message-ID
- <CAOLa=ZSpGXd0W9-1S5r5iDrifu4eeh=YTOf+OB27TH73cZ8iog@mail.gmail.com>
- In-Reply-To
- <aYX7sYaTp6cArMxA@pks.im>
Patrick Steinhardt <ps@pks.im> writes:
Show 11 quoted lines
> On Mon, Feb 02, 2026 at 01:26:30PM +0100, Karthik Nayak wrote: >> 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. >
Yeah, that's fair.
Show 14 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.
>Will add some more information here.
Show 9 quoted lines
> 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
That's a good point, I hadn't considered, this should be simple enough to do, so let me put that together.
Karthik