diff options
Diffstat (limited to 'object.c')
-rw-r--r-- | object.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -286,8 +286,8 @@ struct object *parse_object_with_flags(struct repository *r, return &commit->object; } - if ((obj && obj->type == OBJ_BLOB && repo_has_object_file(r, oid)) || - (!obj && oid_object_info(r, oid, NULL) == OBJ_BLOB)) { + if ((!obj || (obj && obj->type == OBJ_BLOB)) && + oid_object_info(r, oid, NULL) == OBJ_BLOB) { if (!skip_hash && stream_object_signature(r, repl) < 0) { error(_("hash mismatch %s"), oid_to_hex(oid)); return NULL; |