refs: convert update_ref and refs_update_ref to use struct object_id

Convert update_ref, refs_update_ref, and write_pseudoref to use struct
object_id.  Update the existing callers as well.  Remove update_ref_oid,
as it is no longer needed.

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:51 +00:00
committed by Junio C Hamano
parent 2616a5e508
commit ae077771b0
17 changed files with 65 additions and 74 deletions

View File

@ -437,7 +437,7 @@ int cmd_update_ref(int argc, const char **argv, const char *prefix)
(oldval && !is_null_oid(&oldoid)) ? &oldoid : NULL,
flags);
else
return update_ref(msg, refname, oid.hash, oldval ? oldoid.hash : NULL,
return update_ref(msg, refname, &oid, oldval ? &oldoid : NULL,
flags | create_reflog_flag,
UPDATE_REFS_DIE_ON_ERR);
}