Skip to content

Commit 47ebf58

Browse files
committed
Fix missing oid type for "fake" repositories
... otherwise git_tree__parse_raw() will fail to obtain the correct oid size, which causes the entire parse to fail.
1 parent 8a62616 commit 47ebf58

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/libgit2/repository.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1152,6 +1152,8 @@ int git_repository_wrap_odb(git_repository **repo_out, git_odb *odb)
11521152
repo = repository_alloc();
11531153
GIT_ERROR_CHECK_ALLOC(repo);
11541154

1155+
repo->oid_type = GIT_OID_DEFAULT;
1156+
11551157
git_repository_set_odb(repo, odb);
11561158
*repo_out = repo;
11571159

0 commit comments

Comments
 (0)