| 1507 | } |
| 1508 | |
| 1509 | int ref_transaction_delete(struct ref_transaction *transaction, |
| 1510 | const char *refname, |
| 1511 | const struct object_id *old_oid, |
| 1512 | const char *old_target, |
| 1513 | unsigned int flags, |
| 1514 | const char *msg, |
| 1515 | struct strbuf *err) |
| 1516 | { |
| 1517 | if (old_oid && is_null_oid(old_oid)) |
| 1518 | BUG("delete called with old_oid set to zeros"); |
| 1519 | if (old_oid && old_target) |
| 1520 | BUG("delete called with both old_oid and old_target set"); |
| 1521 | if (old_target && !(flags & REF_NO_DEREF)) |
| 1522 | BUG("delete cannot operate on symrefs with deref mode"); |
| 1523 | return ref_transaction_update(transaction, refname, |
| 1524 | null_oid(transaction->ref_store->repo->hash_algo), old_oid, |
| 1525 | NULL, old_target, flags, |
| 1526 | msg, err); |
| 1527 | } |
| 1528 | |
| 1529 | int ref_transaction_verify(struct ref_transaction *transaction, |
| 1530 | const char *refname, |
no test coverage detected