Branch Coverage

deps/libgit2/src/graph.c
Criterion Covered Total %
branch 52 76 68.4


line true false branch
18 39 6 for (i = 0; i < git_pqueue_size(list); i++) {
20 30 9 if ((commit->flags & STALE) == 0)
24 6 6 while(roots) {
25 0 6 if ((roots->item->flags & STALE) == 0)
41 0 6 if (one == two) {
46 0 6 if (git_pqueue_init(&list, 0, 2, git_commit_list_time_cmp) < 0)
49 0 6 if (git_commit_list_parse(walk, one) < 0)
52 0 6 if (git_pqueue_insert(&list, one) < 0)
55 0 6 if (git_commit_list_parse(walk, two) < 0)
58 0 6 if (git_pqueue_insert(&list, two) < 0)
62 30 6 while (interesting(&list, roots)) {
66 0 30 if (commit == NULL)
70 9 21 if (flags == (PARENT1 | PARENT2)) {
71 6 3 if (!(commit->flags & RESULT))
77 30 30 for (i = 0; i < commit->out_degree; i++) {
79 6 24 if ((p->flags & flags) == flags)
82 0 24 if (git_commit_list_parse(walk, p) < 0)
86 0 24 if (git_pqueue_insert(&list, p) < 0)
91 6 24 if (commit->out_degree == 0) {
92 0 6 if (git_commit_list_insert(commit, &roots) == NULL)
117 0 6 if (git_pqueue_init(&pq, 0, 2, git_commit_list_time_cmp) < 0)
120 6 0 if ((error = git_pqueue_insert(&pq, one)) < 0 ||
6 0 if ((error = git_pqueue_insert(&pq, one)) < 0 ||
124 30 6 while ((commit = git_pqueue_pop(&pq)) != NULL) {
125 18 12 if (commit->flags & RESULT ||
6 12 if (commit->flags & RESULT ||
128 6 6 else if (commit->flags & PARENT1)
130 6 0 else if (commit->flags & PARENT2)
133 18 12 for (i = 0; i < commit->out_degree; i++) {
135 0 18 if ((error = git_pqueue_insert(&pq, p)) < 0)
152 0 6 if (git_revwalk_new(&walk, repo) < 0)
156 0 6 if (commit_u == NULL)
160 0 6 if (commit_l == NULL)
163 0 6 if (mark_parents(walk, commit_l, commit_u) < 0)
165 0 6 if (ahead_behind(commit_l, commit_u, ahead, behind) < 0)
182 0 20 if (git_oid_equal(commit, ancestor))
187 0 20 if (error == GIT_ENOTFOUND)
190 0 20 if (error < 0)