Re: [PATCH v2 2/9] refs: introduce `ref_store_init_options`
- From
Patrick Steinhardt <ps@pks.im>
- Date
- Apr 23, 2026, 08:52 UTC
- Message-ID
- <aendvlxDYMHNn4Sq@pks.im>
- In-Reply-To
- <20260423-refs-move-to-generic-layer-v2-2-ae5a4f146d7d@gmail.com>
On Thu, Apr 23, 2026 at 10:40:31AM +0200, Karthik Nayak wrote:
Show 14 quoted lines
> diff --git a/refs/files-backend.c b/refs/files-backend.c > index b3b0c25f84..78150ad209 100644 > --- a/refs/files-backend.c > +++ b/refs/files-backend.c > @@ -120,11 +120,13 @@ static struct ref_store *files_ref_store_init(struct repository *repo, > &ref_common_dir); > > base_ref_store_init(ref_store, repo, refdir.buf, &refs_be_files); > - refs->store_flags = flags; > + > refs->gitcommondir = strbuf_detach(&ref_common_dir, NULL); > refs->packed_ref_store = > - packed_ref_store_init(repo, NULL, refs->gitcommondir, flags); > + packed_ref_store_init(repo, payload, refs->gitcommondir, opts);
Is this change here intentional? Doesn't seem to be related to any of the other changes here.
Show 15 quoted lines
> diff --git a/refs/refs-internal.h b/refs/refs-internal.h
> index 2d963cc4f4..f49b3807bf 100644
> --- a/refs/refs-internal.h
> +++ b/refs/refs-internal.h
> @@ -385,6 +385,15 @@ struct ref_store;
> REF_STORE_ODB | \
> REF_STORE_MAIN)
>
> +/*
> + * Options for initializing the ref backend. All backend-agnostic information
> + * which backends required will be held here.
> + */
> +struct ref_store_init_options {
> + /* The kind of operations that the ref_store is allowed to perform. */
> + unsigned int access_flags;Smells like something that should be converted into an enum eventually, but that definitely is out of scope for this patch series.
Patrick