Branch Coverage

deps/libgit2/src/libgit2/diff_parse.c
Criterion Covered Total %
branch 13 22 59.0


line true false branch
20 2 1 git_vector_foreach(&diff->patches, i, patch)
36 0 1 if ((diff = git__calloc(1, sizeof(git_diff_parsed))) == NULL)
48 0 1 if (git_diff_options_init(&diff->base.opts, GIT_DIFF_OPTIONS_VERSION) < 0) {
56 0 1 git_vector_init(&diff->patches, 0, NULL) < 0 ||
80 0 1 GIT_ERROR_CHECK_ALLOC(diff);
83 0 1 GIT_ERROR_CHECK_ALLOC(ctx);
85 3 0 while (ctx->parse_ctx.remain_len) {
86 1 2 if ((error = git_patch_parse(&patch, ctx)) < 0)
93 1 0 if (error == GIT_ENOTFOUND && git_vector_length(&diff->patches) > 0) {
1 0 if (error == GIT_ENOTFOUND && git_vector_length(&diff->patches) > 0) {
100 0 1 if (error < 0)