From: Nicolas Pitre Date: Mon, 26 Feb 2007 19:55:57 +0000 (-0500) Subject: sha1_file.c: don't ignore an error condition in sha1_loose_object_info() X-Git-Tag: v1.5.1-rc1~119^2~5 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=9ba630318f6fbc2f129e5a6872d70d2914cacb39;p=git.git sha1_file.c: don't ignore an error condition in sha1_loose_object_info() Signed-off-by: Nicolas Pitre Signed-off-by: Junio C Hamano --- diff --git a/sha1_file.c b/sha1_file.c index 8147a4f50..8b7b68c45 100644 --- a/sha1_file.c +++ b/sha1_file.c @@ -1461,7 +1461,7 @@ static int sha1_loose_object_info(const unsigned char *sha1, char *type, unsigne if (unpack_sha1_header(&stream, map, mapsize, hdr, sizeof(hdr)) < 0) status = error("unable to unpack %s header", sha1_to_hex(sha1)); - if (parse_sha1_header(hdr, type, &size) < 0) + else if (parse_sha1_header(hdr, type, &size) < 0) status = error("unable to parse %s header", sha1_to_hex(sha1)); else { status = 0;