Skip to content

Commit a2d3316

Browse files
committed
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()`.
1 parent 9a10244 commit a2d3316

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/refdb_fs.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2129,6 +2129,9 @@ int git_refdb_backend_fs(
21292129
backend = git__calloc(1, sizeof(refdb_fs_backend));
21302130
GIT_ERROR_CHECK_ALLOC(backend);
21312131

2132+
if (git_refdb_init_backend(&backend->parent, GIT_REFDB_BACKEND_VERSION) < 0)
2133+
goto fail;
2134+
21322135
backend->repo = repository;
21332136

21342137
if (repository->gitdir) {

0 commit comments

Comments
 (0)