Branch Coverage

deps/libgit2/src/libgit2/graph.c
Criterion Covered Total %
branch 65 96 67.7


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_generation_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)
179 0 21 if (git_oid_equal(commit, ancestor))
199 0 21 if (!length)
202 21 21 for (i = 0; i < length; ++i) {
203 0 21 if (git_oid_equal(commit_id, &descendant_array[i]))
207 0 21 if ((error = git_vector_init(&list, length + 1, NULL)) < 0)
210 0 21 if ((error = git_revwalk_new(&walk, repo)) < 0)
213 21 21 for (i = 0; i < length; i++) {
215 0 21 if (commit == NULL) {
221 21 0 if (minimum_generation > commit->generation)
226 0 21 if (commit == NULL) {
231 0 21 if (minimum_generation > commit->generation)
234 1 20 if ((error = git_merge__bases_many(&result, walk, commit, &list, minimum_generation)) < 0)
237 20 0 if (result) {