Web lists-archives.com

Re: [PATCH 12/16] refs: store the main ref store inside the repository struct




On 04/09, Stefan Beller wrote:
> Hi Brandon,
> 
> On Mon, Apr 9, 2018 at 4:24 PM, Brandon Williams <bmwill@xxxxxxxxxx> wrote:
> 
> >> -     main_ref_store = ref_store_init(get_git_dir(), REF_STORE_ALL_CAPS);
> >> -     return main_ref_store;
> >> +     r->main_ref_store = ref_store_init(r->gitdir, REF_STORE_ALL_CAPS);
> >> +     return r->main_ref_store;
> >
> > I assume that since this takes in a git dir as a parameter
> > that the ref-store is in a good enough place to be embedded in a
> > repository struct (as in this would work with an arbitrary repo)?
> 
> That is my current understanding.
> 
> As the refs code can also take a path into a submodule and construct
> a submodule ref store for the caller, we'd want to resolve the tension
> between the ref store and the repository struct who is responsible for
> the submodule ref store eventually by removing the submodule
> functionality from the ref store and only relying on the ref stores created by
> the repository struct.

oh right, assuming it can already handle submodule ref-stores it should
work as-is then.

-- 
Brandon Williams