line |
true |
false |
branch |
29
|
0 |
48 |
GIT_ASSERT_ARG(out); |
30
|
0 |
48 |
GIT_ASSERT_ARG(commit); |
35
|
0 |
48 |
GIT_ERROR_CHECK_ALLOC(annotated_commit); |
39
|
0 |
48 |
if ((error = git_commit_dup(&annotated_commit->commit, commit)) < 0) |
45
|
22 |
26 |
if (!description) |
49
|
0 |
48 |
GIT_ERROR_CHECK_ALLOC(annotated_commit->description); |
52
|
48 |
0 |
if (!error) |
67
|
0 |
47 |
GIT_ASSERT_ARG(out); |
68
|
0 |
47 |
GIT_ASSERT_ARG(repo); |
69
|
0 |
47 |
GIT_ASSERT_ARG(id); |
73
|
1 |
46 |
if ((error = git_commit_lookup(&commit, repo, id)) < 0) |
106
|
0 |
0 |
GIT_ASSERT_ARG(out); |
107
|
0 |
0 |
GIT_ASSERT_ARG(repo); |
108
|
0 |
0 |
GIT_ASSERT_ARG(revspec); |
110
|
0 |
0 |
if ((error = git_revparse_single(&obj, repo, revspec)) < 0) |
113
|
0 |
0 |
if ((error = git_object_peel(&commit, obj, GIT_OBJECT_COMMIT))) { |
134
|
0 |
26 |
GIT_ASSERT_ARG(out); |
135
|
0 |
26 |
GIT_ASSERT_ARG(repo); |
136
|
0 |
26 |
GIT_ASSERT_ARG(ref); |
140
|
0 |
26 |
if ((error = git_reference_peel(&peeled, ref, GIT_OBJECT_COMMIT)) < 0) |
148
|
26 |
0 |
if (!error) { |
150
|
0 |
26 |
GIT_ERROR_CHECK_ALLOC((*out)->ref_name); |
164
|
0 |
5 |
GIT_ASSERT_ARG(out); |
165
|
0 |
5 |
GIT_ASSERT_ARG(repo); |
169
|
0 |
5 |
if ((error = git_reference_lookup(&head, repo, GIT_HEAD_FILE)) < 0) |
185
|
0 |
0 |
GIT_ASSERT_ARG(out); |
186
|
0 |
0 |
GIT_ASSERT_ARG(repo); |
187
|
0 |
0 |
GIT_ASSERT_ARG(branch_name); |
188
|
0 |
0 |
GIT_ASSERT_ARG(remote_url); |
189
|
0 |
0 |
GIT_ASSERT_ARG(id); |
191
|
0 |
0 |
if (annotated_commit_init_from_id(out, repo, id, branch_name) < 0) |
195
|
0 |
0 |
GIT_ERROR_CHECK_ALLOC((*out)->ref_name); |
198
|
0 |
0 |
GIT_ERROR_CHECK_ALLOC((*out)->remote_url); |
207
|
0 |
52 |
GIT_ASSERT_ARG_WITH_RETVAL(annotated_commit, NULL); |
214
|
0 |
0 |
GIT_ASSERT_ARG_WITH_RETVAL(annotated_commit, NULL); |
220
|
21 |
45 |
if (annotated_commit == NULL) |