refs: convert delete_ref and refs_delete_ref to struct object_id

Convert delete_ref and refs_delete_ref to take a pointer to struct
object_id.  Update the documentation accordingly, including referring to
null_oid in lowercase, as it is not a #define constant.

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:50 +00:00
committed by Junio C Hamano
parent 49e9958869
commit 2616a5e508
9 changed files with 26 additions and 25 deletions

View File

@@ -434,7 +434,7 @@ int cmd_update_ref(int argc, const char **argv, const char *prefix)
* NULL_SHA1 as "don't care" here:
*/
return delete_ref(msg, refname,
(oldval && !is_null_oid(&oldoid)) ? oldoid.hash : NULL,
(oldval && !is_null_oid(&oldoid)) ? &oldoid : NULL,
flags);
else
return update_ref(msg, refname, oid.hash, oldval ? oldoid.hash : NULL,