Branch Coverage

deps/libgit2/src/libgit2/odb_mempack.c
Criterion Covered Total %
branch 27 42 64.2


line true false branch
44 0 6 if (git_oidmap_exists(db->objects, oid))
47 0 6 GIT_ERROR_CHECK_ALLOC_ADD(&alloc_len, sizeof(struct memobject), len);
0 6 GIT_ERROR_CHECK_ALLOC_ADD(&alloc_len, sizeof(struct memobject), len);
49 0 6 GIT_ERROR_CHECK_ALLOC(obj);
56 0 6 if (git_oidmap_set(db->objects, &obj->oid, obj) < 0)
59 2 4 if (type == GIT_OBJECT_COMMIT) {
60 1 1 struct memobject **store = git_array_alloc(db->commits);
1 0 struct memobject **store = git_array_alloc(db->commits);
61 0 2 GIT_ERROR_CHECK_ALLOC(store);
80 5 17 if ((obj = git_oidmap_get(db->objects, oid)) == NULL)
86 0 17 GIT_ERROR_CHECK_ALLOC(*buffer_p);
97 8 11 if ((obj = git_oidmap_get(db->objects, oid)) == NULL)
115 0 3 if (git_packbuilder_new(&packbuilder, repo) < 0)
120 3 3 for (i = 0; i < db->commits.size; ++i) {
124 0 3 if (err < 0)
140 3 0 GIT_BUF_WRAP_PRIVATE(pack, git_mempack__dump, repo, _backend);
3 0 GIT_BUF_WRAP_PRIVATE(pack, git_mempack__dump, repo, _backend);
148 6 2 git_oidmap_foreach_value(db->objects, object, {
172 0 1 GIT_ASSERT_ARG(out);
175 0 1 GIT_ERROR_CHECK_ALLOC(db);
177 0 1 if (git_oidmap_new(&db->objects) < 0)