Branch Coverage

deps/libgit2/src/odb_mempack.c
Criterion Covered Total %
branch 25 38 65.7


line true false branch
42 0 6 if (git_oidmap_exists(db->objects, oid))
45 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);
47 0 6 GIT_ERROR_CHECK_ALLOC(obj);
54 0 6 if (git_oidmap_set(db->objects, &obj->oid, obj) < 0)
57 2 4 if (type == GIT_OBJECT_COMMIT) {
58 1 1 struct memobject **store = git_array_alloc(db->commits);
1 0 struct memobject **store = git_array_alloc(db->commits);
59 0 2 GIT_ERROR_CHECK_ALLOC(store);
78 5 17 if ((obj = git_oidmap_get(db->objects, oid)) == NULL)
84 0 17 GIT_ERROR_CHECK_ALLOC(*buffer_p);
95 8 11 if ((obj = git_oidmap_get(db->objects, oid)) == NULL)
110 0 3 if (git_packbuilder_new(&packbuilder, repo) < 0)
113 3 3 for (i = 0; i < db->commits.size; ++i) {
117 0 3 if (err < 0)
133 6 2 git_oidmap_foreach_value(db->objects, object, {
157 0 1 assert(out);
160 0 1 GIT_ERROR_CHECK_ALLOC(db);
162 0 1 if (git_oidmap_new(&db->objects) < 0)