MCPcopy Index your code
hub / github.com/git/git / ref_transaction_delete

Function ref_transaction_delete

refs.c:1509–1527  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1507}
1508
1509int 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
1529int ref_transaction_verify(struct ref_transaction *transaction,
1530 const char *refname,

Callers 7

refs_delete_refFunction · 0.85
refs_delete_refsFunction · 0.85
parse_cmd_deleteFunction · 0.85
parse_cmd_symref_deleteFunction · 0.85
updateFunction · 0.85
prune_refsFunction · 0.85
rename_one_refFunction · 0.85

Calls 3

is_null_oidFunction · 0.85
ref_transaction_updateFunction · 0.85
null_oidFunction · 0.85

Tested by

no test coverage detected