diff options
author | Han-Wen Nienhuys <hanwen@google.com> | 2021-12-22 21:11:54 +0300 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2021-12-23 00:51:38 +0300 |
commit | f9f7fd3b238cc56224c30235a0d248d027b7ecfa (patch) | |
tree | 6963c12e8fcfbd835794ca7d4207e47692ae0bbb /refs.c | |
parent | a6db572af6bc792590716856d80e8b9c02a55bec (diff) |
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>
Diffstat (limited to 'refs.c')
-rw-r--r-- | refs.c | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -2007,10 +2007,12 @@ struct ref_store *get_worktree_ref_store(const struct worktree *wt) return refs; } -void base_ref_store_init(struct ref_store *refs, - const struct ref_storage_be *be) +void base_ref_store_init(struct ref_store *refs, struct repository *repo, + const char *path, const struct ref_storage_be *be) { refs->be = be; + refs->repo = repo; + refs->gitdir = xstrdup(path); } /* backend functions */ |