object: convert parse_object* to take struct object_id
[gitweb.git] / builtin / receive-pack.c
index 6f0f788b0cb9fd0174ce9572843e43e69e27a131..36e0e29ea210df4106c1ab828fffa4a8306273a3 100644 (file)
@@ -1058,8 +1058,8 @@ static const char *update(struct command *cmd, struct shallow_info *si)
                struct object *old_object, *new_object;
                struct commit *old_commit, *new_commit;
 
-               old_object = parse_object(old_oid->hash);
-               new_object = parse_object(new_oid->hash);
+               old_object = parse_object(old_oid);
+               new_object = parse_object(new_oid);
 
                if (!old_object || !new_object ||
                    old_object->type != OBJ_COMMIT ||
@@ -1082,7 +1082,7 @@ static const char *update(struct command *cmd, struct shallow_info *si)
 
        if (is_null_oid(new_oid)) {
                struct strbuf err = STRBUF_INIT;
-               if (!parse_object(old_oid->hash)) {
+               if (!parse_object(old_oid)) {
                        old_oid = NULL;
                        if (ref_exists(name)) {
                                rp_warning("Allowing deletion of corrupt ref.");