From 89f3bbdd3b1f46a5747aa5618b7742f7b3f2adef Mon Sep 17 00:00:00 2001 From: "brian m. carlson" Date: Sun, 15 Oct 2017 22:06:53 +0000 Subject: 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 Signed-off-by: Junio C Hamano --- fast-import.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'fast-import.c') diff --git a/fast-import.c b/fast-import.c index d5e4cf0ba..32951b0d4 100644 --- a/fast-import.c +++ b/fast-import.c @@ -1778,7 +1778,7 @@ static int update_branch(struct branch *b) } transaction = ref_transaction_begin(&err); if (!transaction || - ref_transaction_update(transaction, b->name, b->oid.hash, old_oid.hash, + ref_transaction_update(transaction, b->name, &b->oid, &old_oid, 0, msg, &err) || ref_transaction_commit(transaction, &err)) { ref_transaction_free(transaction); @@ -1820,7 +1820,7 @@ static void dump_tags(void) strbuf_addf(&ref_name, "refs/tags/%s", t->name); if (ref_transaction_update(transaction, ref_name.buf, - t->oid.hash, NULL, 0, msg, &err)) { + &t->oid, NULL, 0, msg, &err)) { failure |= error("%s", err.buf); goto cleanup; } -- cgit v1.2.1