Branch Coverage

deps/libgit2/src/libgit2/transport.c
Criterion Covered Total %
branch 17 56 30.3


line true false branch
54 0 2 git_vector_foreach(&custom_transports, i, d) {
55 0 0 if (strncasecmp(url, d->prefix, strlen(d->prefix)) == 0) {
61 8 1 for (i = 0; i < GIT_TRANSPORT_COUNT; ++i) {
64 1 7 if (strncasecmp(url, d->prefix, strlen(d->prefix)) == 0) {
93 1 1 if (!definition && strrchr(url, ':')) {
0 1 if (!definition && strrchr(url, ':')) {
101 1 1 if (!definition && git_fs_path_exists(url) && git_fs_path_isdir(url))
1 0 if (!definition && git_fs_path_exists(url) && git_fs_path_isdir(url))
1 0 if (!definition && git_fs_path_exists(url) && git_fs_path_isdir(url))
105 0 2 if (!definition)
125 0 2 if ((error = transport_find_fn(&fn, url, ¶m)) == GIT_ENOTFOUND) {
128 0 2 } else if (error < 0)
131 0 2 if ((error = fn(&transport, owner, param)) < 0)
134 0 2 GIT_ERROR_CHECK_VERSION(transport, GIT_TRANSPORT_VERSION, "git_transport");
151 0 0 GIT_ASSERT_ARG(scheme);
152 0 0 GIT_ASSERT_ARG(cb);
154 0 0 if ((error = git_str_printf(&prefix, "%s://", scheme)) < 0)
157 0 0 git_vector_foreach(&custom_transports, i, d) {
158 0 0 if (strcasecmp(d->prefix, prefix.ptr) == 0) {
165 0 0 GIT_ERROR_CHECK_ALLOC(definition);
171 0 0 if (git_vector_insert(&custom_transports, definition) < 0)
189 0 0 GIT_ASSERT_ARG(scheme);
191 0 0 if ((error = git_str_printf(&prefix, "%s://", scheme)) < 0)
194 0 0 git_vector_foreach(&custom_transports, i, d) {
195 0 0 if (strcasecmp(d->prefix, prefix.ptr) == 0) {
196 0 0 if ((error = git_vector_remove(&custom_transports, i)) < 0)
202 0 0 if (!custom_transports.length)
219 0 0 GIT_INIT_STRUCTURE_FROM_TEMPLATE(