line |
true |
false |
branch |
61
|
0 |
0 |
GIT_ASSERT_ARG(out); |
62
|
0 |
0 |
GIT_ASSERT_ARG(cfg); |
65
|
0 |
0 |
GIT_ERROR_CHECK_ALLOC(tx); |
79
|
0 |
3 |
GIT_ASSERT_ARG(out); |
80
|
0 |
3 |
GIT_ASSERT_ARG(repo); |
82
|
0 |
3 |
if ((error = git_pool_init(&pool, 1)) < 0) |
86
|
0 |
3 |
if (!tx) { |
91
|
0 |
3 |
if ((error = git_strmap_new(&tx->locks)) < 0) { |
96
|
0 |
3 |
if ((error = git_repository_refdb(&tx->db, repo)) < 0) |
115
|
0 |
3 |
GIT_ASSERT_ARG(tx); |
116
|
0 |
3 |
GIT_ASSERT_ARG(refname); |
119
|
0 |
3 |
GIT_ERROR_CHECK_ALLOC(node); |
122
|
0 |
3 |
GIT_ERROR_CHECK_ALLOC(node->name); |
124
|
0 |
3 |
if ((error = git_refdb_lock(&node->payload, tx->db, refname)) < 0) |
127
|
0 |
3 |
if ((error = git_strmap_set(tx->locks, node->name, node)) < 0) |
142
|
0 |
6 |
if ((node = git_strmap_get(tx->locks, refname)) == NULL) { |
153
|
0 |
2 |
if (sig && git_signature__pdup(&node->sig, sig, &tx->pool) < 0) |
|
0 |
0 |
if (sig && git_signature__pdup(&node->sig, sig, &tx->pool) < 0) |
156
|
2 |
0 |
if (!node->sig) { |
160
|
0 |
2 |
if (git_reference__log_signature(&tmp, tx->repo) < 0) |
166
|
0 |
2 |
if (error < 0) |
170
|
0 |
2 |
if (msg) { |
172
|
0 |
0 |
GIT_ERROR_CHECK_ALLOC(node->message); |
183
|
0 |
2 |
GIT_ASSERT_ARG(tx); |
184
|
0 |
2 |
GIT_ASSERT_ARG(refname); |
185
|
0 |
2 |
GIT_ASSERT_ARG(target); |
187
|
0 |
2 |
if ((error = find_locked(&node, tx, refname)) < 0) |
190
|
0 |
2 |
if ((error = copy_common(node, tx, sig, msg)) < 0) |
204
|
0 |
0 |
GIT_ASSERT_ARG(tx); |
205
|
0 |
0 |
GIT_ASSERT_ARG(refname); |
206
|
0 |
0 |
GIT_ASSERT_ARG(target); |
208
|
0 |
0 |
if ((error = find_locked(&node, tx, refname)) < 0) |
211
|
0 |
0 |
if ((error = copy_common(node, tx, sig, msg)) < 0) |
215
|
0 |
0 |
GIT_ERROR_CHECK_ALLOC(node->target.symbolic); |
226
|
0 |
1 |
if ((error = find_locked(&node, tx, refname)) < 0) |
242
|
0 |
3 |
GIT_ERROR_CHECK_ALLOC(reflog); |
245
|
0 |
3 |
GIT_ERROR_CHECK_ALLOC(reflog->ref_name); |
250
|
0 |
3 |
GIT_ERROR_CHECK_ALLOC(reflog->entries.contents); |
253
|
0 |
3 |
GIT_ERROR_CHECK_ALLOC(entries); |
255
|
2 |
3 |
for (i = 0; i < len; i++) { |
267
|
0 |
2 |
GIT_ERROR_CHECK_ALLOC(tgt->msg); |
269
|
0 |
2 |
if (git_signature__pdup(&tgt->committer, src->committer, pool) < 0) |
283
|
0 |
3 |
GIT_ASSERT_ARG(tx); |
284
|
0 |
3 |
GIT_ASSERT_ARG(refname); |
285
|
0 |
3 |
GIT_ASSERT_ARG(reflog); |
287
|
0 |
3 |
if ((error = find_locked(&node, tx, refname)) < 0) |
290
|
0 |
3 |
if ((error = dup_reflog(&node->reflog, reflog, &tx->pool)) < 0) |
301
|
3 |
0 |
if (node->ref_type == GIT_REFERENCE_DIRECT) { |
303
|
0 |
0 |
} else if (node->ref_type == GIT_REFERENCE_SYMBOLIC) { |
309
|
0 |
3 |
GIT_ERROR_CHECK_ALLOC(ref); |
312
|
1 |
2 |
if (node->remove) { |
314
|
2 |
0 |
} else if (node->ref_type == GIT_REFERENCE_DIRECT) { |
316
|
0 |
0 |
} else if (node->ref_type == GIT_REFERENCE_SYMBOLIC) { |
333
|
0 |
3 |
GIT_ASSERT_ARG(tx); |
335
|
0 |
3 |
if (tx->type == TRANSACTION_CONFIG) { |
342
|
3 |
0 |
git_strmap_foreach_value(tx->locks, node, { |
|
0 |
3 |
git_strmap_foreach_value(tx->locks, node, { |
|
0 |
3 |
git_strmap_foreach_value(tx->locks, node, { |
|
0 |
0 |
git_strmap_foreach_value(tx->locks, node, { |
|
0 |
3 |
git_strmap_foreach_value(tx->locks, node, { |
|
3 |
3 |
git_strmap_foreach_value(tx->locks, node, { |
368
|
0 |
3 |
if (!tx) |
371
|
0 |
3 |
if (tx->type == TRANSACTION_CONFIG) { |
372
|
0 |
0 |
if (tx->cfg) { |
382
|
3 |
0 |
git_strmap_foreach_value(tx->locks, node, { |
|
3 |
3 |
git_strmap_foreach_value(tx->locks, node, { |