diff options
author | Han-Wen Nienhuys <hanwen@google.com> | 2021-12-22 19:11:54 +0100 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2021-12-22 22:51:38 +0100 |
commit | f9f7fd3b238cc56224c30235a0d248d027b7ecfa (patch) | |
tree | 6963c12e8fcfbd835794ca7d4207e47692ae0bbb /refs/files-backend.c | |
parent | refs: print error message in debug output (diff) | |
download | git-f9f7fd3b238cc56224c30235a0d248d027b7ecfa.tar.xz git-f9f7fd3b238cc56224c30235a0d248d027b7ecfa.zip |
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/files-backend.c')
-rw-r--r-- | refs/files-backend.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/refs/files-backend.c b/refs/files-backend.c index f1b66130df..5c6d49a267 100644 --- a/refs/files-backend.c +++ b/refs/files-backend.c @@ -86,11 +86,8 @@ static struct ref_store *files_ref_store_create(struct repository *repo, struct ref_store *ref_store = (struct ref_store *)refs; struct strbuf sb = STRBUF_INIT; - ref_store->repo = repo; - ref_store->gitdir = xstrdup(gitdir); - base_ref_store_init(ref_store, &refs_be_files); + base_ref_store_init(ref_store, repo, gitdir, &refs_be_files); refs->store_flags = flags; - get_common_dir_noenv(&sb, gitdir); refs->gitcommondir = strbuf_detach(&sb, NULL); refs->packed_ref_store = |