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

Function cmd_delete_ref

t/helper/test-ref-store.c:273–285  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

271}
272
273static int cmd_delete_ref(struct ref_store *refs, const char **argv)
274{
275 const char *msg = notnull(*argv++, "msg");
276 const char *refname = notnull(*argv++, "refname");
277 const char *sha1_buf = notnull(*argv++, "old-sha1");
278 unsigned int flags = arg_flags(*argv++, "flags", transaction_flags);
279 struct object_id old_oid;
280
281 if (get_oid_hex(sha1_buf, &old_oid))
282 die("cannot parse %s as %s", sha1_buf, the_hash_algo->name);
283
284 return refs_delete_ref(refs, msg, refname, &old_oid, flags);
285}
286
287static int cmd_update_ref(struct ref_store *refs, const char **argv)
288{

Callers

nothing calls this directly

Calls 5

notnullFunction · 0.85
arg_flagsFunction · 0.85
get_oid_hexFunction · 0.85
refs_delete_refFunction · 0.85
dieFunction · 0.50

Tested by

no test coverage detected