| 1527 | } |
| 1528 | |
| 1529 | int ref_transaction_verify(struct ref_transaction *transaction, |
| 1530 | const char *refname, |
| 1531 | const struct object_id *old_oid, |
| 1532 | const char *old_target, |
| 1533 | unsigned int flags, |
| 1534 | struct strbuf *err) |
| 1535 | { |
| 1536 | if (!old_target && !old_oid) |
| 1537 | BUG("verify called with old_oid and old_target set to NULL"); |
| 1538 | if (old_oid && old_target) |
| 1539 | BUG("verify called with both old_oid and old_target set"); |
| 1540 | if (old_target && !(flags & REF_NO_DEREF)) |
| 1541 | BUG("verify cannot operate on symrefs with deref mode"); |
| 1542 | return ref_transaction_update(transaction, refname, |
| 1543 | NULL, old_oid, |
| 1544 | NULL, old_target, |
| 1545 | flags, NULL, err); |
| 1546 | } |
| 1547 | |
| 1548 | int refs_update_ref(struct ref_store *refs, const char *msg, |
| 1549 | const char *refname, const struct object_id *new_oid, |
no test coverage detected