Commit 69c068c7 by nulltoken

index: make git_index_new() work with a NULL path

parent 353e9916
......@@ -259,7 +259,7 @@ int git_index_open(git_index **index_out, const char *index_path)
{
git_index *index;
assert(index_out && index_path);
assert(index_out);
index = git__calloc(1, sizeof(git_index));
GITERR_CHECK_ALLOC(index);
......
#include "clar_libgit2.h"
void test_index_inmemory__can_create_an_inmemory_index(void)
{
git_index *index;
cl_git_pass(git_index_new(&index));
cl_assert_equal_i(0, git_index_entrycount(index));
git_index_free(index);
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment