diff options
author | brian m. carlson <sandals@crustytoothpaste.net> | 2017-10-15 22:06:53 +0000 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2017-10-16 11:05:50 +0900 |
commit | 89f3bbdd3b1f46a5747aa5618b7742f7b3f2adef (patch) | |
tree | e8345a55653b4f286a86bde54f44244b4fcc2201 /builtin/replace.c | |
parent | refs: prevent accidental NULL dereference in write_pseudoref (diff) | |
download | tgif-89f3bbdd3b1f46a5747aa5618b7742f7b3f2adef.tar.xz |
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 'builtin/replace.c')
-rw-r--r-- | builtin/replace.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/builtin/replace.c b/builtin/replace.c index 2854eaa0f3..3099e55307 100644 --- a/builtin/replace.c +++ b/builtin/replace.c @@ -175,7 +175,7 @@ static int replace_object_oid(const char *object_ref, transaction = ref_transaction_begin(&err); if (!transaction || - ref_transaction_update(transaction, ref.buf, repl->hash, prev.hash, + ref_transaction_update(transaction, ref.buf, repl, &prev, 0, NULL, &err) || ref_transaction_commit(transaction, &err)) die("%s", err.buf); |