From fa8ca519ccc6c0821864fcdb203fac92409ee0ec Mon Sep 17 00:00:00 2001 From: Pierre-Olivier Latour Date: Fri, 23 Jan 2015 15:35:29 -0800 Subject: [PATCH] Allow passing a NULL index to git_repository_set_index() This is supported by the underlying set_index() implementation and setting the repository index to NULL is recommended by the git_repository_set_bare() documentation. --- src/repository.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/repository.c b/src/repository.c index f49a25124..30f0cd0f2 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); }