line |
true |
false |
branch |
32
|
6 |
0 |
if ((error = git_str_joinpath(&file_path, repo->gitdir, GIT_CHERRYPICK_HEAD_FILE)) >= 0 && |
|
6 |
0 |
if ((error = git_str_joinpath(&file_path, repo->gitdir, GIT_CHERRYPICK_HEAD_FILE)) >= 0 && |
33
|
6 |
0 |
(error = git_filebuf_open(&file, file_path.ptr, GIT_FILEBUF_CREATE_LEADING_DIRS, GIT_CHERRYPICK_FILE_MODE)) >= 0 && |
37
|
0 |
6 |
if (error < 0) |
53
|
6 |
0 |
if ((error = git_str_joinpath(&file_path, repo->gitdir, GIT_MERGE_MSG_FILE)) < 0 || |
|
6 |
0 |
if ((error = git_str_joinpath(&file_path, repo->gitdir, GIT_MERGE_MSG_FILE)) < 0 || |
54
|
6 |
0 |
(error = git_filebuf_open(&file, file_path.ptr, GIT_FILEBUF_CREATE_LEADING_DIRS, GIT_CHERRYPICK_FILE_MODE)) < 0 || |
61
|
0 |
6 |
if (error < 0) |
81
|
6 |
0 |
if (given != NULL) |
88
|
0 |
6 |
if (!opts->checkout_opts.checkout_strategy) |
91
|
6 |
0 |
if (!opts->checkout_opts.our_label) |
94
|
6 |
0 |
if (!opts->checkout_opts.their_label) |
129
|
0 |
6 |
GIT_ASSERT_ARG(out); |
130
|
0 |
6 |
GIT_ASSERT_ARG(repo); |
131
|
0 |
6 |
GIT_ASSERT_ARG(cherrypick_commit); |
132
|
0 |
6 |
GIT_ASSERT_ARG(our_commit); |
134
|
0 |
6 |
if (git_commit_parentcount(cherrypick_commit) > 1) { |
135
|
0 |
0 |
if (!mainline) |
141
|
0 |
6 |
if (mainline) |
148
|
6 |
0 |
if (parent && |
|
6 |
0 |
if (parent && |
149
|
6 |
0 |
((error = git_commit_parent(&parent_commit, cherrypick_commit, (parent - 1))) < 0 || |
153
|
6 |
0 |
if ((error = git_commit_tree(&cherrypick_tree, cherrypick_commit)) < 0 || |
|
6 |
0 |
if ((error = git_commit_tree(&cherrypick_tree, cherrypick_commit)) < 0 || |
183
|
0 |
6 |
GIT_ASSERT_ARG(repo); |
184
|
0 |
6 |
GIT_ASSERT_ARG(commit); |
186
|
0 |
6 |
GIT_ERROR_CHECK_VERSION(given_opts, GIT_CHERRYPICK_OPTIONS_VERSION, "git_cherrypick_options"); |
188
|
0 |
6 |
if ((error = git_repository__ensure_not_bare(repo, "cherry-pick")) < 0) |
191
|
6 |
0 |
if ((commit_msg = git_commit_message(commit)) == NULL || |
|
0 |
6 |
if ((commit_msg = git_commit_message(commit)) == NULL || |
199
|
6 |
0 |
if ((error = write_merge_msg(repo, commit_msg)) < 0 || |
|
6 |
0 |
if ((error = write_merge_msg(repo, commit_msg)) < 0 || |
200
|
6 |
0 |
(error = git_str_printf(&their_label, "%.7s... %s", commit_oidstr, commit_summary)) < 0 || |
201
|
6 |
0 |
(error = cherrypick_normalize_opts(repo, &opts, given_opts, git_str_cstr(&their_label))) < 0 || |
202
|
6 |
0 |
(error = git_indexwriter_init_for_operation(&indexwriter, repo, &opts.checkout_opts.checkout_strategy)) < 0 || |
203
|
6 |
0 |
(error = write_cherrypick_head(repo, commit_oidstr)) < 0 || |
204
|
6 |
0 |
(error = git_repository_head(&our_ref, repo)) < 0 || |
205
|
6 |
0 |
(error = git_reference_peel((git_object **)&our_commit, our_ref, GIT_OBJECT_COMMIT)) < 0 || |
206
|
5 |
1 |
(error = git_cherrypick_commit(&index, repo, commit, our_commit, opts.mainline, &opts.merge_opts)) < 0 || |
207
|
5 |
0 |
(error = git_merge__check_result(repo, index)) < 0 || |
208
|
5 |
0 |
(error = git_merge__append_conflicts_to_merge_msg(repo, index)) < 0 || |
209
|
5 |
0 |
(error = git_checkout_index(repo, index, &opts.checkout_opts)) < 0 || |
231
|
0 |
0 |
GIT_INIT_STRUCTURE_FROM_TEMPLATE( |