Re: [PATCH 2/9] setup: stop applying repository format twice
On Fri, Jun 12, 2026 at 02:00:20AM -0700, Karthik Nayak wrote:
Show 22 quoted lines
> Patrick Steinhardt <ps@pks.im> writes:
>
> > When discovering the repository in "setup.c" we apply the final
> > repository format multiple times:
> >
> > - Once via `repository_format_configure()`, where we configure the
> > repository format for both `struct repository_format` and `struct
> > repository`.
> >
> > - And once via `apply_repository_format()`, where we then apply the
> > `struct repository_format` to the `struct repository` again.
> >
>
> Okay so we're talking applying the repository format to the `struct
> repository` specifically.
>
> > As the format will be applied to the repository when applying the format
> > it's thus somewhat unnecessary to also apply it to the repository when
> > adapting the discovered format.
>
> This was a bit confusing to read at first. Okay since we already apply
> the format in the second step, the first is not necessary.
I agree. I'll rephrase this a bit.
Patrick