line |
true |
false |
branch |
31
|
0 |
20 |
if (reflog == NULL) |
34
|
20 |
0 |
if (reflog->db) |
35
|
0 |
20 |
GIT_REFCOUNT_DEC(reflog->db, git_refdb__free); |
|
0 |
0 |
GIT_REFCOUNT_DEC(reflog->db, git_refdb__free); |
37
|
38 |
20 |
for (i=0; i < reflog->entries.length; i++) { |
53
|
20 |
0 |
assert(reflog && repo && name); |
|
20 |
0 |
assert(reflog && repo && name); |
|
0 |
20 |
assert(reflog && repo && name); |
55
|
0 |
20 |
if ((error = git_repository_refdb__weakptr(&refdb, repo)) < 0) |
65
|
4 |
0 |
assert(reflog && reflog->db); |
|
0 |
4 |
assert(reflog && reflog->db); |
76
|
3 |
0 |
assert(reflog && new_oid && committer); |
|
3 |
0 |
assert(reflog && new_oid && committer); |
|
0 |
3 |
assert(reflog && new_oid && committer); |
79
|
0 |
3 |
GIT_ERROR_CHECK_ALLOC(entry); |
81
|
0 |
3 |
if ((git_signature_dup(&entry->committer, committer)) < 0) |
84
|
3 |
0 |
if (msg != NULL) { |
87
|
0 |
3 |
if ((entry->msg = git__strndup(msg, msglen)) == NULL) |
94
|
24 |
3 |
for (i = 0; i < msglen; i++) |
95
|
0 |
24 |
if (entry->msg[i] == '\n') |
101
|
1 |
2 |
if (previous == NULL) |
108
|
0 |
3 |
if (git_vector_insert(&reflog->entries, entry) < 0) |
123
|
0 |
0 |
if ((error = git_repository_refdb__weakptr(&refdb, repo)) < 0) |
134
|
0 |
1 |
if ((error = git_repository_refdb__weakptr(&refdb, repo)) < 0) |
142
|
0 |
39 |
assert(reflog); |
148
|
0 |
46 |
assert(reflog); |
150
|
1 |
45 |
if (idx >= reflog->entries.length) |
159
|
0 |
3 |
assert(entry); |
165
|
0 |
19 |
assert(entry); |
171
|
0 |
16 |
assert(entry); |
177
|
0 |
25 |
assert(entry); |
190
|
0 |
4 |
if (entry == NULL) { |
197
|
0 |
4 |
if (git_vector_remove( |
201
|
0 |
4 |
if (!rewrite_previous_entry) |
205
|
3 |
1 |
if (idx == 0) |
209
|
0 |
1 |
if (entrycount == 1) |
215
|
0 |
1 |
if (idx == entrycount - 1) { |
217
|
0 |
0 |
if (git_oid_fromstr(&entry->oid_old, GIT_OID_HEX_ZERO) < 0) |