line |
true |
false |
branch |
22
|
0 |
0 |
GIT_ASSERT(t->current_stream); |
26
|
0 |
0 |
if ((error = t->current_stream->read(t->current_stream, buf->data + buf->offset, buf->len - buf->offset, &bytes_read)) < 0) |
31
|
0 |
0 |
if (t->packetsize_cb && !t->cancelled.val) { |
|
0 |
0 |
if (t->packetsize_cb && !t->cancelled.val) { |
33
|
0 |
0 |
if (error) { |
44
|
0 |
0 |
if (t->current_stream) { |
49
|
0 |
0 |
if (close_subtransport) { |
53
|
0 |
0 |
if (t->wrapped->close(t->wrapped) < 0) |
66
|
0 |
0 |
git_vector_foreach(&t->refs, i, pkt) { |
68
|
0 |
0 |
if (pkt->type != GIT_PKT_REF) |
71
|
0 |
0 |
if (symrefs) { |
77
|
0 |
0 |
git_vector_foreach(symrefs, j, spec) { |
79
|
0 |
0 |
if (git_refspec_src_matches(spec, ref->head.name) && |
|
0 |
0 |
if (git_refspec_src_matches(spec, ref->head.name) && |
88
|
0 |
0 |
if (error < 0) |
92
|
0 |
0 |
if (git_vector_insert(&t->heads, &ref->head) < 0) |
104
|
0 |
0 |
git_vector_foreach(symrefs, i, spec) { |
126
|
0 |
0 |
if (git_smart__reset_stream(t, true) < 0) |
129
|
0 |
0 |
if (git_remote_connect_options_normalize(&t->connect_opts, t->owner->repo, connect_opts) < 0) |
133
|
0 |
0 |
GIT_ERROR_CHECK_ALLOC(t->url); |
137
|
0 |
0 |
if (GIT_DIRECTION_FETCH == t->direction) { |
139
|
0 |
0 |
} else if (GIT_DIRECTION_PUSH == t->direction) { |
146
|
0 |
0 |
if ((error = t->wrapped->action(&stream, t->wrapped, t->url, service)) < 0) |
155
|
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) |
159
|
0 |
0 |
if (t->rpc) { |
162
|
0 |
0 |
if (!pkt || GIT_PKT_COMMENT != pkt->type) { |
|
0 |
0 |
if (!pkt || GIT_PKT_COMMENT != pkt->type) { |
176
|
0 |
0 |
if (pkt && GIT_PKT_REF != pkt->type) { |
|
0 |
0 |
if (pkt && GIT_PKT_REF != pkt->type) { |
182
|
0 |
0 |
if ((error = git_vector_init(&symrefs, 1, NULL)) < 0) |
186
|
0 |
0 |
if ((error = git_smart__detect_caps(first, &t->caps, &symrefs)) == 0) { |
188
|
0 |
0 |
if (1 == t->refs.length && !strcmp(first->head.name, "capabilities^{}") && |
196
|
0 |
0 |
} else if (error == GIT_ENOTFOUND) { |
204
|
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) |
222
|
0 |
0 |
if (!t->connected) { |
236
|
0 |
0 |
if (t->caps.want_tip_sha1) |
239
|
0 |
0 |
if (t->caps.want_reachable_sha1) |
249
|
0 |
0 |
if (!t->have_refs) { |
266
|
0 |
0 |
if (t->rpc && git_smart__reset_stream(t, false) < 0) |
|
0 |
0 |
if (t->rpc && git_smart__reset_stream(t, false) < 0) |
269
|
0 |
0 |
if (GIT_DIRECTION_FETCH != t->direction) { |
274
|
0 |
0 |
if ((error = t->wrapped->action(&stream, t->wrapped, t->url, GIT_SERVICE_UPLOADPACK)) < 0) |
278
|
0 |
0 |
GIT_ASSERT(t->rpc || t->current_stream == stream); |
|
0 |
0 |
GIT_ASSERT(t->rpc || t->current_stream == stream); |
283
|
0 |
0 |
if ((error = stream->write(stream, (const char *)data, len)) < 0) |
295
|
0 |
0 |
if (t->rpc && git_smart__reset_stream(t, false) < 0) |
|
0 |
0 |
if (t->rpc && git_smart__reset_stream(t, false) < 0) |
298
|
0 |
0 |
if (GIT_DIRECTION_PUSH != t->direction) { |
303
|
0 |
0 |
if ((error = t->wrapped->action(stream, t->wrapped, t->url, GIT_SERVICE_RECEIVEPACK)) < 0) |
307
|
0 |
0 |
GIT_ASSERT(t->rpc || t->current_stream == *stream); |
|
0 |
0 |
GIT_ASSERT(t->rpc || t->current_stream == *stream); |
346
|
0 |
0 |
if (t->connected && !t->rpc && |
353
|
0 |
0 |
git_vector_foreach(common, i, p) |
358
|
0 |
0 |
if (t->url) { |
382
|
0 |
0 |
git_vector_foreach(refs, i, p) |
404
|
0 |
0 |
GIT_ASSERT_ARG(transport); |
405
|
0 |
0 |
GIT_ASSERT_ARG(cert); |
406
|
0 |
0 |
GIT_ASSERT_ARG(hostname); |
408
|
0 |
0 |
if (!connect_opts->callbacks.certificate_check) |
419
|
0 |
0 |
GIT_ASSERT_ARG(out); |
420
|
0 |
0 |
GIT_ASSERT_ARG(transport); |
422
|
0 |
0 |
if (!connect_opts->callbacks.credentials) |
434
|
0 |
0 |
GIT_ASSERT_ARG(out); |
435
|
0 |
0 |
GIT_ASSERT_ARG(transport); |
445
|
0 |
0 |
if (!param) |
449
|
0 |
0 |
GIT_ERROR_CHECK_ALLOC(t); |
467
|
0 |
0 |
if (git_vector_init(&t->refs, 16, ref_name_cmp) < 0) { |
472
|
0 |
0 |
if (git_vector_init(&t->heads, 16, ref_name_cmp) < 0) { |
477
|
0 |
0 |
if (definition->callback(&t->wrapped, &t->parent, definition->param) < 0) { |