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.
This commit is contained in:
Pierre-Olivier Latour 2015-01-23 15:35:29 -08:00
parent a789b36100
commit fa8ca519cc

View File

@ -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) void git_repository_set_index(git_repository *repo, git_index *index)
{ {
assert(repo && index); assert(repo);
set_index(repo, index); set_index(repo, index);
} }