refs: update ref transactions to use struct object_id

Update the ref transaction code to use struct object_id.  Remove one
NULL pointer check which was previously inserted around a dereference;
since we now pass a pointer to struct object_id directly through, the
code we're calling handles this for us.

Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
brian m. carlson
2017-10-15 22:06:53 +00:00
committed by Junio C Hamano
parent 6ee18216d8
commit 89f3bbdd3b
15 changed files with 69 additions and 71 deletions

View File

@ -1139,7 +1139,7 @@ static const char *update(struct command *cmd, struct shallow_info *si)
}
if (ref_transaction_delete(transaction,
namespaced_name,
old_oid ? old_oid->hash : NULL,
old_oid,
0, "push", &err)) {
rp_error("%s", err.buf);
strbuf_release(&err);
@ -1156,7 +1156,7 @@ static const char *update(struct command *cmd, struct shallow_info *si)
if (ref_transaction_update(transaction,
namespaced_name,
new_oid->hash, old_oid->hash,
new_oid, old_oid,
0, "push",
&err)) {
rp_error("%s", err.buf);