Merge pull request #2837 from swisspol/set_index Allow passing a NULL index to git_repository_set_index()
diff --git a/src/repository.c b/src/repository.c
index daf9ee4..d87ce73 100644
--- a/src/repository.c
+++ b/src/repository.c
@@ -776,7 +776,7 @@ int git_repository_index(git_index **out, git_repository *repo)
void git_repository_set_index(git_repository *repo, git_index *index)
{
- assert(repo && index);
+ assert(repo);
set_index(repo, index);
}