| line |
true |
false |
branch |
|
21
|
0 |
0 |
assert(t->current_stream); |
|
25
|
0 |
0 |
if ((error = t->current_stream->read(t->current_stream, buf->data + buf->offset, buf->len - buf->offset, &bytes_read)) < 0) |
|
30
|
0 |
0 |
if (t->packetsize_cb && !t->cancelled.val) { |
|
|
0 |
0 |
if (t->packetsize_cb && !t->cancelled.val) { |
|
32
|
0 |
0 |
if (error) { |
|
43
|
0 |
0 |
if (t->current_stream) { |
|
48
|
0 |
0 |
if (close_subtransport) { |
|
52
|
0 |
0 |
if (t->wrapped->close(t->wrapped) < 0) |
|
79
|
0 |
0 |
if (!colon) |
|
91
|
0 |
0 |
if (c) |
|
94
|
0 |
0 |
if (c) |
|
99
|
0 |
0 |
if (name_len < 1) |
|
120
|
0 |
0 |
for (i = 0; i < ARRAY_SIZE(forbidden_custom_headers); i++) |
|
121
|
0 |
0 |
if (strncmp(forbidden_custom_headers[i], custom_header, name_len) == 0) |
|
134
|
0 |
0 |
if (t->custom_headers.count) |
|
137
|
0 |
0 |
if (!custom_headers) |
|
140
|
0 |
0 |
for (i = 0; i < custom_headers->count; i++) { |
|
141
|
0 |
0 |
if (is_malformed_http_header(custom_headers->strings[i])) { |
|
145
|
0 |
0 |
if (is_forbidden_custom_header(custom_headers->strings[i])) { |
|
160
|
0 |
0 |
git_vector_foreach(&t->refs, i, pkt) { |
|
162
|
0 |
0 |
if (pkt->type != GIT_PKT_REF) |
|
165
|
0 |
0 |
if (symrefs) { |
|
171
|
0 |
0 |
git_vector_foreach(symrefs, j, spec) { |
|
173
|
0 |
0 |
if (git_refspec_src_matches(spec, ref->head.name) && |
|
|
0 |
0 |
if (git_refspec_src_matches(spec, ref->head.name) && |
|
182
|
0 |
0 |
if (error < 0) |
|
186
|
0 |
0 |
if (git_vector_insert(&t->heads, &ref->head) < 0) |
|
198
|
0 |
0 |
git_vector_foreach(symrefs, i, spec) { |
|
223
|
0 |
0 |
if (git_smart__reset_stream(t, true) < 0) |
|
227
|
0 |
0 |
GIT_ERROR_CHECK_ALLOC(t->url); |
|
229
|
0 |
0 |
if (git_proxy_options_dup(&t->proxy, proxy) < 0) |
|
237
|
0 |
0 |
if (GIT_DIRECTION_FETCH == t->direction) |
|
239
|
0 |
0 |
else if (GIT_DIRECTION_PUSH == t->direction) |
|
246
|
0 |
0 |
if ((error = t->wrapped->action(&stream, t->wrapped, t->url, service)) < 0) |
|
255
|
0 |
0 |
if ((error = git_smart__store_refs(t, t->rpc ? 2 : 1)) < 0) |
|
|
0 |
0 |
if ((error = git_smart__store_refs(t, t->rpc ? 2 : 1)) < 0) |
|
259
|
0 |
0 |
if (t->rpc) { |
|
262
|
0 |
0 |
if (!pkt || GIT_PKT_COMMENT != pkt->type) { |
|
|
0 |
0 |
if (!pkt || GIT_PKT_COMMENT != pkt->type) { |
|
276
|
0 |
0 |
if (pkt && GIT_PKT_REF != pkt->type) { |
|
|
0 |
0 |
if (pkt && GIT_PKT_REF != pkt->type) { |
|
282
|
0 |
0 |
if ((error = git_vector_init(&symrefs, 1, NULL)) < 0) |
|
286
|
0 |
0 |
if ((error = git_smart__detect_caps(first, &t->caps, &symrefs)) == 0) { |
|
288
|
0 |
0 |
if (1 == t->refs.length && !strcmp(first->head.name, "capabilities^{}") && |
|
296
|
0 |
0 |
} else if (error == GIT_ENOTFOUND) { |
|
304
|
0 |
0 |
if (t->rpc && (error = git_smart__reset_stream(t, false)) < 0) |
|
|
0 |
0 |
if (t->rpc && (error = git_smart__reset_stream(t, false)) < 0) |
|
320
|
0 |
0 |
if (!t->have_refs) { |
|
337
|
0 |
0 |
if (t->rpc && git_smart__reset_stream(t, false) < 0) |
|
|
0 |
0 |
if (t->rpc && git_smart__reset_stream(t, false) < 0) |
|
340
|
0 |
0 |
if (GIT_DIRECTION_FETCH != t->direction) { |
|
345
|
0 |
0 |
if ((error = t->wrapped->action(&stream, t->wrapped, t->url, GIT_SERVICE_UPLOADPACK)) < 0) |
|
349
|
0 |
0 |
assert(t->rpc || t->current_stream == stream); |
|
|
0 |
0 |
assert(t->rpc || t->current_stream == stream); |
|
354
|
0 |
0 |
if ((error = stream->write(stream, (const char *)data, len)) < 0) |
|
366
|
0 |
0 |
if (t->rpc && git_smart__reset_stream(t, false) < 0) |
|
|
0 |
0 |
if (t->rpc && git_smart__reset_stream(t, false) < 0) |
|
369
|
0 |
0 |
if (GIT_DIRECTION_PUSH != t->direction) { |
|
374
|
0 |
0 |
if ((error = t->wrapped->action(stream, t->wrapped, t->url, GIT_SERVICE_RECEIVEPACK)) < 0) |
|
378
|
0 |
0 |
assert(t->rpc || t->current_stream == *stream); |
|
|
0 |
0 |
assert(t->rpc || t->current_stream == *stream); |
|
426
|
0 |
0 |
if (t->connected && !t->rpc && |
|
433
|
0 |
0 |
git_vector_foreach(common, i, p) |
|
438
|
0 |
0 |
if (t->url) { |
|
462
|
0 |
0 |
git_vector_foreach(refs, i, p) |
|
484
|
0 |
0 |
assert(transport && cert && hostname); |
|
|
0 |
0 |
assert(transport && cert && hostname); |
|
|
0 |
0 |
assert(transport && cert && hostname); |
|
486
|
0 |
0 |
if (!t->certificate_check_cb) |
|
496
|
0 |
0 |
assert(out && transport); |
|
|
0 |
0 |
assert(out && transport); |
|
498
|
0 |
0 |
if (!t->cred_acquire_cb) |
|
515
|
0 |
0 |
if (!param) |
|
519
|
0 |
0 |
GIT_ERROR_CHECK_ALLOC(t); |
|
538
|
0 |
0 |
if (git_vector_init(&t->refs, 16, ref_name_cmp) < 0) { |
|
543
|
0 |
0 |
if (git_vector_init(&t->heads, 16, ref_name_cmp) < 0) { |
|
548
|
0 |
0 |
if (definition->callback(&t->wrapped, &t->parent, definition->param) < 0) { |