Branch Coverage

deps/libgit2/src/libgit2/commit_list.c
Criterion Covered Total %
branch 31 60 51.6


line true false branch
20 0 169 if (!generation_a || !generation_b) {
0 0 if (!generation_a || !generation_b) {
25 0 0 if (generation_a < generation_b)
27 0 0 if (generation_a > generation_b)
38 14 201 if (time_a < time_b)
40 17 184 if (time_a > time_b)
49 292 0 if (new_list != NULL) {
62 10 87 while ((p = *pp) != NULL) {
63 0 10 if (git_commit_list_time_cmp(p->item, item) > 0)
82 178 0 if (n_parents <= PARENTS_PER_COMMIT)
85 0 0 if (git__multiply_sizet_overflow(&bytes, n_parents, sizeof(git_commit_list_node *)))
96 339 85 if (list == NULL)
99 122 85 while (list) {
111 170 21 git_commit_list_node *item = top ? top->item : NULL;
113 170 21 if (top) {
130 0 178 GIT_ERROR_CHECK_ALLOC(commit);
133 0 178 if (git_commit__parse_ext(commit, obj, GIT_COMMIT_PARSE_QUICK) < 0) {
138 0 178 if (!git__is_uint16(git_array_size(commit->parent_ids))) {
148 0 178 GIT_ERROR_CHECK_ALLOC(node->parents);
150 145 178 git_array_foreach(commit->parent_ids, i, parent_oid) {
145 0 git_array_foreach(commit->parent_ids, i, parent_oid) {
167 114 179 if (commit->parsed)
172 0 179 if (cgraph_file) {
176 0 0 if (error == 0 && git__is_uint16(e.parent_count)) {
0 0 if (error == 0 && git__is_uint16(e.parent_count)) {
182 0 0 GIT_ERROR_CHECK_ALLOC(commit->parents);
184 0 0 for (i = 0; i < commit->out_degree; ++i) {
187 0 0 if (error < 0)
196 1 178 if ((error = git_odb_read(&obj, walk->odb, &commit->oid)) < 0)
199 0 178 if (obj->cached.type != GIT_OBJECT_COMMIT) {