summaryrefslogtreecommitdiff
path: root/src/libgit2/repository.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/libgit2/repository.c')
-rw-r--r--src/libgit2/repository.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/libgit2/repository.c b/src/libgit2/repository.c
index 3f57fb23c..4bf92dcdc 100644
--- a/src/libgit2/repository.c
+++ b/src/libgit2/repository.c
@@ -1547,7 +1547,8 @@ int git_repository_index__weakptr(git_index **out, git_repository *repo)
if ((error = repository_index_path(&index_path, repo)) < 0)
return error;
- error = git_index_open(&index, index_path.ptr);
+ error = git_index__open(&index, index_path.ptr, repo->oid_type);
+
if (!error) {
GIT_REFCOUNT_OWN(index, repo);