line |
true |
false |
branch |
35
|
0 |
20 |
if (reflog == NULL) |
38
|
20 |
0 |
if (reflog->db) |
39
|
0 |
20 |
GIT_REFCOUNT_DEC(reflog->db, git_refdb__free); |
|
0 |
0 |
GIT_REFCOUNT_DEC(reflog->db, git_refdb__free); |
41
|
38 |
20 |
for (i=0; i < reflog->entries.length; i++) { |
57
|
20 |
0 |
assert(reflog && repo && name); |
|
20 |
0 |
assert(reflog && repo && name); |
|
0 |
20 |
assert(reflog && repo && name); |
59
|
0 |
20 |
if ((error = git_repository_refdb__weakptr(&refdb, repo)) < 0) |
69
|
4 |
0 |
assert(reflog && reflog->db); |
|
0 |
4 |
assert(reflog && reflog->db); |
80
|
3 |
0 |
assert(reflog && new_oid && committer); |
|
3 |
0 |
assert(reflog && new_oid && committer); |
|
0 |
3 |
assert(reflog && new_oid && committer); |
83
|
0 |
3 |
GIT_ERROR_CHECK_ALLOC(entry); |
85
|
0 |
3 |
if ((git_signature_dup(&entry->committer, committer)) < 0) |
88
|
3 |
0 |
if (msg != NULL) { |
91
|
0 |
3 |
if ((entry->msg = git__strndup(msg, msglen)) == NULL) |
98
|
24 |
3 |
for (i = 0; i < msglen; i++) |
99
|
0 |
24 |
if (entry->msg[i] == '\n') |
105
|
1 |
2 |
if (previous == NULL) |
112
|
0 |
3 |
if (git_vector_insert(&reflog->entries, entry) < 0) |
127
|
0 |
0 |
if ((error = git_repository_refdb__weakptr(&refdb, repo)) < 0) |
138
|
0 |
1 |
if ((error = git_repository_refdb__weakptr(&refdb, repo)) < 0) |
146
|
0 |
39 |
assert(reflog); |
152
|
0 |
46 |
assert(reflog); |
154
|
1 |
45 |
if (idx >= reflog->entries.length) |
163
|
0 |
3 |
assert(entry); |
169
|
0 |
19 |
assert(entry); |
175
|
0 |
16 |
assert(entry); |
181
|
0 |
25 |
assert(entry); |
194
|
0 |
4 |
if (entry == NULL) { |
201
|
0 |
4 |
if (git_vector_remove( |
205
|
0 |
4 |
if (!rewrite_previous_entry) |
209
|
3 |
1 |
if (idx == 0) |
213
|
0 |
1 |
if (entrycount == 1) |
219
|
0 |
1 |
if (idx == entrycount - 1) { |
221
|
0 |
0 |
if (git_oid_fromstr(&entry->oid_old, GIT_OID_HEX_ZERO) < 0) |