line |
true |
false |
branch |
41
|
0 |
0 |
if ((error = git_commit_lookup(&head_obj, repo, target)) < 0) |
45
|
0 |
0 |
if ((error = git_str_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_str_printf(&remote_key, "branch.%s.remote", branch_name) < 0) |
76
|
0 |
0 |
if (git_str_printf(&merge_key, "branch.%s.merge", branch_name) < 0) |
79
|
0 |
0 |
if (git_config_set_string(cfg, git_str_cstr(&remote_key), remote_name) < 0) |
82
|
0 |
0 |
if (git_config_set_string(cfg, git_str_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) |
146
|
0 |
0 |
if ((error = git_repository_initialbranch(&initialbranch, repo)) < 0) |
149
|
0 |
0 |
if (git__prefixcmp(initialbranch.ptr, GIT_REFS_HEADS_DIR) != 0) { |
180
|
0 |
0 |
if (refspec == NULL) { |
186
|
0 |
0 |
if ((error = git_refspec__transform( |
192
|
0 |
0 |
if ((error = git_str_printf(&remote_head_name, |
225
|
0 |
0 |
if ((error = git_remote_ls(&refs, &refs_len, remote)) < 0) |
229
|
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)) |
234
|
0 |
0 |
GIT_ASSERT(remote_head); |
239
|
0 |
0 |
if (error == GIT_ENOTFOUND) { |
245
|
0 |
0 |
if ((error = update_remote_head(repo, remote, &branch, reflog_message)) < 0) |
271
|
0 |
0 |
GIT_ASSERT_ARG(remote); |
272
|
0 |
0 |
GIT_ASSERT_ARG(branch); |
274
|
0 |
0 |
if ((retcode = git_str_printf(&remote_branch_name, GIT_REFS_REMOTES_DIR "%s/%s", |
278
|
0 |
0 |
if ((retcode = git_reference_lookup(&remote_ref, repo, git_str_cstr(&remote_branch_name))) < 0) |
281
|
0 |
0 |
if ((retcode = update_head_to_new_branch(repo, git_reference_target(remote_ref), branch, |
285
|
0 |
0 |
if ((retcode = git_remote__default_branch(&default_branch, remote)) < 0) |
288
|
0 |
0 |
if (!git_remote__matching_refspec(remote, git_str_cstr(&default_branch))) |
336
|
0 |
0 |
if (git_fs_path_root(url) < 0 && git_fs_path_exists(url) && git_fs_path_isdir(url)) { |
|
0 |
0 |
if (git_fs_path_root(url) < 0 && git_fs_path_exists(url) && git_fs_path_isdir(url)) { |
|
0 |
0 |
if (git_fs_path_root(url) < 0 && git_fs_path_exists(url) && git_fs_path_isdir(url)) { |
337
|
0 |
0 |
if (p_realpath(url, buf) == NULL) |
343
|
0 |
0 |
if (!remote_create) { |
348
|
0 |
0 |
if ((error = remote_create(&origin, repo, "origin", url, payload)) < 0) |
364
|
0 |
0 |
if (is_bare) |
367
|
0 |
0 |
if (!opts) |
370
|
0 |
0 |
if (opts->checkout_strategy == GIT_CHECKOUT_NONE) |
380
|
0 |
0 |
if (branch) |
386
|
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)) |
399
|
0 |
0 |
GIT_ASSERT_ARG(repo); |
400
|
0 |
0 |
GIT_ASSERT_ARG(_remote); |
402
|
0 |
0 |
if (!git_repository_is_empty(repo)) { |
407
|
0 |
0 |
if ((error = git_remote_dup(&remote, _remote)) < 0) |
415
|
0 |
0 |
if ((error = git_remote_fetch(remote, NULL, &fetch_opts, git_str_cstr(&reflog_message))) != 0) |
433
|
0 |
0 |
if (local == GIT_CLONE_NO_LOCAL) |
436
|
0 |
0 |
if ((is_url = git_fs_path_is_local_file_url(url_or_path)) != 0) { |
437
|
0 |
0 |
if (git_fs_path_fromurl(&fromurl, url_or_path) < 0) { |
445
|
0 |
0 |
is_local = (!is_url || local != GIT_CLONE_LOCAL_AUTO) && |
467
|
0 |
0 |
GIT_ASSERT_ARG(out); |
468
|
0 |
0 |
GIT_ASSERT_ARG(url); |
469
|
0 |
0 |
GIT_ASSERT_ARG(local_path); |
471
|
0 |
0 |
if (_options) |
474
|
0 |
0 |
GIT_ERROR_CHECK_VERSION(&options, GIT_CLONE_OPTIONS_VERSION, "git_clone_options"); |
477
|
0 |
0 |
if (git_fs_path_exists(local_path) && !use_existing && !git_fs_path_is_empty_dir(local_path)) { |
|
0 |
0 |
if (git_fs_path_exists(local_path) && !use_existing && !git_fs_path_is_empty_dir(local_path)) { |
|
0 |
0 |
if (git_fs_path_exists(local_path) && !use_existing && !git_fs_path_is_empty_dir(local_path)) { |
484
|
0 |
0 |
if (git_fs_path_exists(local_path)) |
487
|
0 |
0 |
if (options.repository_cb) |
492
|
0 |
0 |
if ((error = repository_cb(&repo, local_path, options.bare, options.repository_cb_payload)) < 0) |
495
|
0 |
0 |
if (!(error = create_and_configure_origin(&origin, repo, url, &options))) { |
499
|
0 |
0 |
if (clone_local == 1) |
503
|
0 |
0 |
else if (clone_local == 0) |
513
|
0 |
0 |
if (error != 0) { |
549
|
0 |
0 |
GIT_INIT_STRUCTURE_FROM_TEMPLATE( |
572
|
0 |
0 |
if (!link) |
575
|
0 |
0 |
if (p_stat(src, &st_src) < 0) |
578
|
0 |
0 |
if (p_stat(dst, &st_dst) < 0) |
592
|
0 |
0 |
GIT_ASSERT_ARG(repo); |
593
|
0 |
0 |
GIT_ASSERT_ARG(remote); |
595
|
0 |
0 |
if (!git_repository_is_empty(repo)) { |
605
|
0 |
0 |
if ((error = git_fs_path_from_url_or_path(&src_path, git_remote_url(remote))) < 0) |
609
|
0 |
0 |
if ((error = git_repository_open(&src, git_str_cstr(&src_path))) < 0) { |
621
|
0 |
0 |
if (can_link(git_repository_path(src), git_repository_path(repo), link)) |
632
|
0 |
0 |
if (error < 0 && link) { |
|
0 |
0 |
if (error < 0 && link) { |
638
|
0 |
0 |
if (error < 0) |
643
|
0 |
0 |
if ((error = git_remote_fetch(remote, NULL, fetch_opts, git_str_cstr(&reflog_message))) != 0) |