Re: [PATCH 12/16] refs: store the main ref store inside the repository struct
- From
- Brandon Williams <bmwill@google.com>
- Date
- Apr 9, 2018, 23:35 UTC
- Message-ID
- <20180409233521.GC102627@google.com>
- In-Reply-To
- <CAGZ79kYWb=AXCBRodnoYbf9s5HP9Tf-yUoMHjMKm4tTrXa4Bgw@mail.gmail.com>
On 04/09, Stefan Beller wrote:
Show 21 quoted lines
> Hi Brandon, > > On Mon, Apr 9, 2018 at 4:24 PM, Brandon Williams <bmwill@google.com> 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