line |
true |
false |
branch |
26
|
0 |
0 |
if (strcmp(scheme, "http") == 0) |
28
|
0 |
0 |
else if (strcmp(scheme, "https") == 0) |
30
|
0 |
0 |
else if (strcmp(scheme, "git") == 0) |
32
|
0 |
0 |
else if (strcmp(scheme, "ssh") == 0) |
51
|
0 |
0 |
if (http_parser_parse_url(given, strlen(given), false, &u)) { |
63
|
0 |
0 |
if (has_scheme) { |
73
|
0 |
0 |
if (has_host) { |
79
|
0 |
0 |
if (has_port) { |
86
|
0 |
0 |
if (default_port == NULL) { |
94
|
0 |
0 |
if (has_path) { |
102
|
0 |
0 |
if (has_query) { |
108
|
0 |
0 |
if (has_userinfo) { |
113
|
0 |
0 |
if (colon) { |
127
|
0 |
0 |
git_buf_oom(&host) || |
128
|
0 |
0 |
git_buf_oom(&port) || |
129
|
0 |
0 |
git_buf_oom(&path) || |
130
|
0 |
0 |
git_buf_oom(&query) || |
131
|
0 |
0 |
git_buf_oom(&username) || |
167
|
0 |
0 |
if ((query = strchr(two, '?')) != NULL) { |
170
|
0 |
0 |
if (*(++query) != '\0') { |
172
|
0 |
0 |
GIT_ERROR_CHECK_ALLOC(out->query); |
179
|
0 |
0 |
one_len = one->path ? strlen(one->path) : 0; |
180
|
0 |
0 |
while (one_len && one->path[one_len - 1] == '/') |
|
0 |
0 |
while (one_len && one->path[one_len - 1] == '/') |
184
|
0 |
0 |
while (*two == '/') { |
193
|
0 |
0 |
if (git_buf_oom(&path)) |
198
|
0 |
0 |
if (one->scheme) { |
200
|
0 |
0 |
GIT_ERROR_CHECK_ALLOC(out->scheme); |
203
|
0 |
0 |
if (one->host) { |
205
|
0 |
0 |
GIT_ERROR_CHECK_ALLOC(out->host); |
208
|
0 |
0 |
if (one->port) { |
210
|
0 |
0 |
GIT_ERROR_CHECK_ALLOC(out->port); |
213
|
0 |
0 |
if (one->username) { |
215
|
0 |
0 |
GIT_ERROR_CHECK_ALLOC(out->username); |
218
|
0 |
0 |
if (one->password) { |
220
|
0 |
0 |
GIT_ERROR_CHECK_ALLOC(out->password); |
239
|
0 |
0 |
(size_t)(service_query - service_suffix) : full_suffix_len; |
247
|
0 |
0 |
if (suffix_len && path_len >= suffix_len) { |
|
0 |
0 |
if (suffix_len && path_len >= suffix_len) { |
250
|
0 |
0 |
if (git__strncmp(url->path + suffix_offset, service_suffix, suffix_len) == 0 && |
|
0 |
0 |
if (git__strncmp(url->path + suffix_offset, service_suffix, suffix_len) == 0 && |
251
|
0 |
0 |
(!service_query || git__strcmp(url->query, service_query + 1) == 0)) { |
261
|
0 |
0 |
if (truncate < 0 && git__suffixcmp(url->path, service_suffix) == 0) |
|
0 |
0 |
if (truncate < 0 && git__suffixcmp(url->path, service_suffix) == 0) |
265
|
0 |
0 |
if (truncate == 0) |
268
|
0 |
0 |
if (truncate > 0) { |
284
|
0 |
0 |
assert(url && redirect_location); |
|
0 |
0 |
assert(url && redirect_location); |
286
|
0 |
0 |
if (redirect_location[0] == '/') { |
289
|
0 |
0 |
if ((url->path = git__strdup(redirect_location)) == NULL) { |
296
|
0 |
0 |
if ((error = git_net_url_parse(&tmp, redirect_location)) < 0) |
301
|
0 |
0 |
if (original->scheme && |
|
0 |
0 |
if (original->scheme && |
302
|
0 |
0 |
strcmp(original->scheme, tmp.scheme) != 0 && |
324
|
0 |
0 |
if (service_suffix) |
334
|
0 |
0 |
return (url->host && url->port && url->path); |
|
0 |
0 |
return (url->host && url->port && url->path); |
|
0 |
0 |
return (url->host && url->port && url->path); |
356
|
0 |
0 |
if (url->username) { |
359
|
0 |
0 |
if (url->password) { |
369
|
0 |
0 |
if (url->port && !git_net_url_is_default_port(url)) { |
|
0 |
0 |
if (url->port && !git_net_url_is_default_port(url)) { |
374
|
0 |
0 |
git_buf_puts(buf, url->path ? url->path : "/"); |
376
|
0 |
0 |
if (url->query) { |
381
|
0 |
0 |
return git_buf_oom(buf) ? -1 : 0; |
386
|
0 |
0 |
git_buf_puts(buf, url->path ? url->path : "/"); |
388
|
0 |
0 |
if (url->query) { |
393
|
0 |
0 |
return git_buf_oom(buf) ? -1 : 0; |
398
|
0 |
0 |
if (url->username) |
401
|
0 |
0 |
if (url->password) |