line |
true |
false |
branch |
61
|
2 |
6 |
git_vector_foreach(heads, i, head) |
77
|
0 |
2 |
if ((error = git_reference_lookup(&ref, t->repo, name)) < 0) |
81
|
0 |
2 |
if (error < 0) { |
83
|
0 |
0 |
if (!strcmp(name, GIT_HEAD_FILE) && error == GIT_ENOTFOUND) { |
|
0 |
0 |
if (!strcmp(name, GIT_HEAD_FILE) && error == GIT_ENOTFOUND) { |
96
|
0 |
2 |
GIT_ERROR_CHECK_ALLOC(head); |
99
|
0 |
2 |
GIT_ERROR_CHECK_ALLOC(head->name); |
103
|
0 |
2 |
if (git_reference_type(ref) == GIT_REFERENCE_SYMBOLIC) { |
105
|
0 |
0 |
GIT_ERROR_CHECK_ALLOC(head->symref_target); |
109
|
0 |
2 |
if ((error = git_vector_insert(&t->refs, head)) < 0) { |
115
|
2 |
0 |
if (git__prefixcmp(name, GIT_REFS_TAGS_DIR)) |
118
|
0 |
0 |
if ((error = git_object_lookup(&obj, t->repo, &head->oid, GIT_OBJECT_ANY)) < 0) |
125
|
0 |
0 |
if (git_object_type(obj) != GIT_OBJECT_TAG || |
|
0 |
0 |
if (git_object_type(obj) != GIT_OBJECT_TAG || |
133
|
0 |
0 |
GIT_ERROR_CHECK_ALLOC(head); |
135
|
0 |
0 |
if (git_buf_join(&buf, 0, name, peeled) < 0) { |
141
|
0 |
0 |
if (!(error = git_tag_peel(&target, (git_tag *)obj))) { |
144
|
0 |
0 |
if ((error = git_vector_insert(&t->refs, head)) < 0) { |
161
|
0 |
4 |
assert(t); |
163
|
0 |
4 |
if (git_reference_list(&ref_names, t->repo) < 0) |
167
|
0 |
4 |
git_vector_foreach(&t->refs, i, head) { |
179
|
0 |
4 |
if (t->direction == GIT_DIRECTION_FETCH && add_ref(t, GIT_HEAD_FILE) < 0) |
|
0 |
0 |
if (t->direction == GIT_DIRECTION_FETCH && add_ref(t, GIT_HEAD_FILE) < 0) |
182
|
2 |
4 |
for (i = 0; i < ref_names.count; ++i) { |
183
|
0 |
2 |
if (add_ref(t, ref_names.strings[i]) < 0) |
219
|
0 |
4 |
if (t->connected) |
225
|
0 |
4 |
GIT_ERROR_CHECK_ALLOC(t->url); |
230
|
0 |
4 |
if ((error = git_path_from_url_or_path(&buf, url)) < 0) { |
240
|
0 |
4 |
if (error < 0) |
245
|
0 |
4 |
if (store_refs(t) < 0) |
257
|
0 |
2 |
if (!t->have_refs) { |
282
|
0 |
0 |
git_vector_foreach(&t->refs, i, rhead) { |
286
|
0 |
0 |
if (!error) |
288
|
0 |
0 |
else if (error != GIT_ENOTFOUND) |
309
|
2 |
0 |
if (lref[0] != '\0') { |
315
|
0 |
0 |
if ((error = git_reference_lookup(&remote_ref, remote_repo, rref)) < 0) { |
316
|
0 |
0 |
if (error == GIT_ENOTFOUND) |
332
|
36 |
0 |
if (!cbs || !cbs->push_transfer_progress) |
|
36 |
0 |
if (!cbs || !cbs->push_transfer_progress) |
356
|
0 |
2 |
if ((error = git_path_from_url_or_path(&buf, push->remote->url)) < 0) { |
366
|
0 |
2 |
if (error < 0) |
375
|
0 |
2 |
if (!remote_repo->is_bare) { |
381
|
2 |
0 |
if ((error = git_repository_item_path(&odb_path, remote_repo, GIT_REPOSITORY_ITEM_OBJECTS)) < 0 |
382
|
2 |
0 |
|| (error = git_buf_joinpath(&odb_path, odb_path.ptr, "pack")) < 0) |
388
|
0 |
2 |
if (error < 0) |
393
|
2 |
2 |
git_vector_foreach(&push->specs, j, spec) { |
399
|
0 |
2 |
if (!status) |
403
|
0 |
2 |
if (!status->ref) { |
423
|
0 |
0 |
if (last && last->message) |
|
0 |
0 |
if (last && last->message) |
431
|
0 |
2 |
if (error < 0 && !status->msg) { |
|
0 |
0 |
if (error < 0 && !status->msg) { |
437
|
0 |
2 |
if ((error = git_vector_insert(&push->status, status)) < 0) { |
443
|
2 |
0 |
if (push->specs.length) { |
447
|
2 |
0 |
if (!url || t->parent.close(&t->parent) < 0 || |
486
|
0 |
0 |
if (!t->progress_cb) |
489
|
0 |
0 |
if (stage == GIT_PACKBUILDER_ADDING_OBJECTS) { |
491
|
0 |
0 |
} else if (stage == GIT_PACKBUILDER_DELTAFICATION) { |
494
|
0 |
0 |
if (current == total) |
501
|
0 |
0 |
if (git_buf_oom(&progress_info)) |
515
|
0 |
0 |
if (git_reference_type(reference) != GIT_REFERENCE_DIRECT) { |
523
|
0 |
0 |
if (error == GIT_ENOTFOUND || error == GIT_ERROR_INVALID) { |
|
0 |
0 |
if (error == GIT_ENOTFOUND || error == GIT_ERROR_INVALID) { |
550
|
0 |
0 |
if ((error = git_revwalk_new(&walk, t->repo)) < 0) |
554
|
0 |
0 |
if ((error = git_packbuilder_new(&pack, t->repo)) < 0) |
564
|
0 |
0 |
git_vector_foreach(&t->refs, i, rhead) { |
566
|
0 |
0 |
if ((error = git_object_lookup(&obj, t->repo, &rhead->oid, GIT_OBJECT_ANY)) < 0) |
569
|
0 |
0 |
if (git_object_type(obj) == GIT_OBJECT_COMMIT) { |
577
|
0 |
0 |
if (error < 0) |
581
|
0 |
0 |
if ((error = git_reference_foreach(repo, foreach_reference_cb, walk))) |
584
|
0 |
0 |
if ((error = git_packbuilder_insert_walk(pack, walk))) |
587
|
0 |
0 |
if ((error = git_buf_printf(&progress_info, counting_objects_fmt, git_packbuilder_object_count(pack))) < 0) |
590
|
0 |
0 |
if (t->progress_cb && |
|
0 |
0 |
if (t->progress_cb && |
595
|
0 |
0 |
if ((error = git_repository_odb__weakptr(&odb, repo)) < 0) |
601
|
0 |
0 |
if ((error = git_buf_putc(&progress_info, '\n')) < 0) |
604
|
0 |
0 |
if (t->progress_cb && |
|
0 |
0 |
if (t->progress_cb && |
608
|
0 |
0 |
if ((error = git_odb_write_pack(&writepack, odb, progress_cb, progress_payload)) != 0) |
622
|
0 |
0 |
if ((error = git_packbuilder_foreach(pack, foreach_cb, &data)) != 0) |
629
|
0 |
0 |
if (writepack) writepack->free(writepack); |
683
|
4 |
2 |
if (t->repo) { |
688
|
4 |
2 |
if (t->url) { |
721
|
0 |
2 |
GIT_ERROR_CHECK_ALLOC(t); |
736
|
0 |
2 |
if ((error = git_vector_init(&t->refs, 0, NULL)) < 0) { |