summaryrefslogtreecommitdiff
path: root/fast-import.c
diff options
context:
space:
mode:
authorbrian m. carlson <sandals@crustytoothpaste.net>2017-10-15 22:06:53 (GMT)
committerJunio C Hamano <gitster@pobox.com>2017-10-16 02:05:50 (GMT)
commit89f3bbdd3b1f46a5747aa5618b7742f7b3f2adef (patch)
treee8345a55653b4f286a86bde54f44244b4fcc2201 /fast-import.c
parent6ee18216d8d9ca8f76b01282b36bdf590a64d8fc (diff)
downloadgit-89f3bbdd3b1f46a5747aa5618b7742f7b3f2adef.zip
git-89f3bbdd3b1f46a5747aa5618b7742f7b3f2adef.tar.gz
git-89f3bbdd3b1f46a5747aa5618b7742f7b3f2adef.tar.bz2
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>
Diffstat (limited to 'fast-import.c')
-rw-r--r--fast-import.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/fast-import.c b/fast-import.c
index d5e4cf0..32951b0 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;
}