diff options
author | Patrick Steinhardt <ps@pks.im> | 2020-03-13 23:01:11 +0100 |
---|---|---|
committer | Patrick Steinhardt <ps@pks.im> | 2020-03-26 22:12:59 +0100 |
commit | 4dc9323922a1238f8ce4ed391f5efd764794bea3 (patch) | |
tree | d54fe6c50c1ffbdaa853c710727be6690a3293b9 | |
parent | 786b29cb42ed587b437043953bf9efa19eae4f1b (diff) | |
download | libgit2-4dc9323922a1238f8ce4ed391f5efd764794bea3.tar.gz |
refdb_fs: initialize backend version
While the `git_refdb_backend()` struct has a version, we do not
initialize it correctly when calling `git_refdb_backend_fs()`. Fix this
by adding the call to `git_refdb_init_backend()`.
-rw-r--r-- | src/refdb_fs.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/refdb_fs.c b/src/refdb_fs.c index b9b643e22..5c9178755 100644 --- a/src/refdb_fs.c +++ b/src/refdb_fs.c @@ -2080,6 +2080,9 @@ int git_refdb_backend_fs( backend = git__calloc(1, sizeof(refdb_fs_backend)); GIT_ERROR_CHECK_ALLOC(backend); + if (git_refdb_init_backend(&backend->parent, GIT_REFDB_BACKEND_VERSION) < 0) + goto fail; + backend->repo = repository; if (repository->gitdir) { |