refs: centralize initialization of the base ref_store.

Signed-off-by: Han-Wen Nienhuys <hanwen@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Han-Wen Nienhuys
2021-12-22 18:11:54 +00:00
committed by Junio C Hamano
parent a6db572af6
commit f9f7fd3b23
5 changed files with 11 additions and 13 deletions

View File

@ -26,7 +26,8 @@ struct ref_store *maybe_debug_wrap_ref_store(const char *gitdir, struct ref_stor
be_copy->name = store->be->name;
trace_printf_key(&trace_refs, "ref_store for %s\n", gitdir);
res->refs = store;
base_ref_store_init((struct ref_store *)res, be_copy);
base_ref_store_init((struct ref_store *)res, store->repo, gitdir,
be_copy);
return (struct ref_store *)res;
}