line |
true |
false |
branch |
41
|
0 |
0 |
if ((error = git_commit_lookup(&head_obj, repo, target)) < 0) |
45
|
0 |
0 |
if ((error = git_buf_printf(&refname, GIT_REFS_HEADS_DIR "%s", name)) < 0) |
52
|
0 |
0 |
if (!error) |
70
|
0 |
0 |
if (git_repository_config__weakptr(&cfg, repo) < 0) |
73
|
0 |
0 |
if (git_buf_printf(&remote_key, "branch.%s.remote", branch_name) < 0) |
76
|
0 |
0 |
if (git_buf_printf(&merge_key, "branch.%s.merge", branch_name) < 0) |
79
|
0 |
0 |
if (git_config_set_string(cfg, git_buf_cstr(&remote_key), remote_name) < 0) |
82
|
0 |
0 |
if (git_config_set_string(cfg, git_buf_cstr(&merge_key), merge_target) < 0) |
102
|
0 |
0 |
if ((error = create_branch(branch, repo, target, branch_name, log_message)) < 0) |
121
|
0 |
0 |
if (!git__prefixcmp(name, GIT_REFS_HEADS_DIR)) |
127
|
0 |
0 |
if (!error) |
134
|
0 |
0 |
if (error == GIT_EEXISTS) |
153
|
0 |
0 |
if ((error = git_remote_ls(&refs, &refs_len, remote)) < 0) |
157
|
0 |
0 |
if (refs_len == 0 || strcmp(refs[0]->name, GIT_HEAD_FILE)) |
|
0 |
0 |
if (refs_len == 0 || strcmp(refs[0]->name, GIT_HEAD_FILE)) |
163
|
0 |
0 |
assert(remote_head); |
168
|
0 |
0 |
if (error == GIT_ENOTFOUND) { |
176
|
0 |
0 |
if (refspec == NULL) { |
183
|
0 |
0 |
if ((error = git_refspec_transform( |
212
|
0 |
0 |
assert(remote_name && branch); |
|
0 |
0 |
assert(remote_name && branch); |
214
|
0 |
0 |
if ((retcode = git_buf_printf(&remote_branch_name, GIT_REFS_REMOTES_DIR "%s/%s", |
218
|
0 |
0 |
if ((retcode = git_reference_lookup(&remote_ref, repo, git_buf_cstr(&remote_branch_name))) < 0) |
266
|
0 |
0 |
if (git_path_root(url) < 0 && git_path_exists(url) && git_path_isdir(url)) { |
|
0 |
0 |
if (git_path_root(url) < 0 && git_path_exists(url) && git_path_isdir(url)) { |
|
0 |
0 |
if (git_path_root(url) < 0 && git_path_exists(url) && git_path_isdir(url)) { |
267
|
0 |
0 |
if (p_realpath(url, buf) == NULL) |
273
|
0 |
0 |
if (!remote_create) { |
278
|
0 |
0 |
if ((error = remote_create(&origin, repo, "origin", url, payload)) < 0) |
294
|
0 |
0 |
if (is_bare) |
297
|
0 |
0 |
if (!opts) |
300
|
0 |
0 |
if (opts->checkout_strategy == GIT_CHECKOUT_NONE) |
310
|
0 |
0 |
if (branch) |
317
|
0 |
0 |
if (!error && should_checkout(repo, git_repository_is_bare(repo), co_opts)) |
|
0 |
0 |
if (!error && should_checkout(repo, git_repository_is_bare(repo), co_opts)) |
330
|
0 |
0 |
assert(repo && _remote); |
|
0 |
0 |
assert(repo && _remote); |
332
|
0 |
0 |
if (!git_repository_is_empty(repo)) { |
337
|
0 |
0 |
if ((error = git_remote_dup(&remote, _remote)) < 0) |
345
|
0 |
0 |
if ((error = git_remote_fetch(remote, NULL, &fetch_opts, git_buf_cstr(&reflog_message))) != 0) |
363
|
0 |
0 |
if (local == GIT_CLONE_NO_LOCAL) |
366
|
0 |
0 |
if ((is_url = git_path_is_local_file_url(url_or_path)) != 0) { |
367
|
0 |
0 |
if (git_path_fromurl(&fromurl, url_or_path) < 0) { |
375
|
0 |
0 |
is_local = (!is_url || local != GIT_CLONE_LOCAL_AUTO) && |
397
|
0 |
0 |
assert(out && url && local_path); |
|
0 |
0 |
assert(out && url && local_path); |
|
0 |
0 |
assert(out && url && local_path); |
399
|
0 |
0 |
if (_options) |
402
|
0 |
0 |
GIT_ERROR_CHECK_VERSION(&options, GIT_CLONE_OPTIONS_VERSION, "git_clone_options"); |
405
|
0 |
0 |
if (git_path_exists(local_path) && !use_existing && !git_path_is_empty_dir(local_path)) { |
|
0 |
0 |
if (git_path_exists(local_path) && !use_existing && !git_path_is_empty_dir(local_path)) { |
|
0 |
0 |
if (git_path_exists(local_path) && !use_existing && !git_path_is_empty_dir(local_path)) { |
412
|
0 |
0 |
if (git_path_exists(local_path)) |
415
|
0 |
0 |
if (options.repository_cb) |
420
|
0 |
0 |
if ((error = repository_cb(&repo, local_path, options.bare, options.repository_cb_payload)) < 0) |
423
|
0 |
0 |
if (!(error = create_and_configure_origin(&origin, repo, url, &options))) { |
427
|
0 |
0 |
if (clone_local == 1) |
431
|
0 |
0 |
else if (clone_local == 0) |
441
|
0 |
0 |
if (error != 0) { |
477
|
0 |
0 |
GIT_INIT_STRUCTURE_FROM_TEMPLATE( |
498
|
0 |
0 |
if (!link) |
501
|
0 |
0 |
if (p_stat(src, &st_src) < 0) |
504
|
0 |
0 |
if (p_stat(dst, &st_dst) < 0) |
518
|
0 |
0 |
assert(repo && remote); |
|
0 |
0 |
assert(repo && remote); |
520
|
0 |
0 |
if (!git_repository_is_empty(repo)) { |
530
|
0 |
0 |
if ((error = git_path_from_url_or_path(&src_path, git_remote_url(remote))) < 0) |
534
|
0 |
0 |
if ((error = git_repository_open(&src, git_buf_cstr(&src_path))) < 0) { |
539
|
0 |
0 |
if (git_repository_item_path(&src_odb, src, GIT_REPOSITORY_ITEM_OBJECTS) < 0 |
540
|
0 |
0 |
|| git_repository_item_path(&dst_odb, repo, GIT_REPOSITORY_ITEM_OBJECTS) < 0) { |
546
|
0 |
0 |
if (can_link(git_repository_path(src), git_repository_path(repo), link)) |
557
|
0 |
0 |
if (error < 0 && link) { |
|
0 |
0 |
if (error < 0 && link) { |
563
|
0 |
0 |
if (error < 0) |
568
|
0 |
0 |
if ((error = git_remote_fetch(remote, NULL, fetch_opts, git_buf_cstr(&reflog_message))) != 0) |