aboutsummaryrefslogtreecommitdiffstats
path: root/refs.c
diff options
context:
space:
mode:
authorHan-Wen Nienhuys <hanwen@google.com>2021-12-22 18:11:54 +0000
committerJunio C Hamano <gitster@pobox.com>2021-12-22 13:51:38 -0800
commitf9f7fd3b238cc56224c30235a0d248d027b7ecfa (patch)
tree6963c12e8fcfbd835794ca7d4207e47692ae0bbb /refs.c
parenta6db572af6bc792590716856d80e8b9c02a55bec (diff)
downloadgit-f9f7fd3b238cc56224c30235a0d248d027b7ecfa.tar.gz
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.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/refs.c b/refs.c
index 4c31795581..f91edb7307 100644
--- a/refs.c
+++ b/refs.c
@@ -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 */