MCPcopy Create free account
hub / github.com/git/git / ref_transaction_verify

Function ref_transaction_verify

refs.c:1529–1546  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1527}
1528
1529int 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
1548int refs_update_ref(struct ref_store *refs, const char *msg,
1549 const char *refname, const struct object_id *new_oid,

Callers 2

parse_cmd_verifyFunction · 0.85
parse_cmd_symref_verifyFunction · 0.85

Calls 1

ref_transaction_updateFunction · 0.85

Tested by

no test coverage detected