X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=object.c;h=78a44a6ef4e4823487861c9173f3db4a3fb76e3a;hb=ac78e548049f4e86b38368d2c4b4dbb546c64ac6;hp=5b468893421794c50741ce9085c12bc41fb1985f;hpb=240c77c7146a58834cf7e425bde956b646c69024;p=git.git diff --git a/object.c b/object.c index 5b4688934..78a44a6ef 100644 --- a/object.c +++ b/object.c @@ -184,8 +184,10 @@ struct object *parse_object(const unsigned char *sha1) if (buffer) { struct object *obj; - if (check_sha1_signature(sha1, buffer, size, typename(type)) < 0) - printf("sha1 mismatch %s\n", sha1_to_hex(sha1)); + if (check_sha1_signature(sha1, buffer, size, typename(type)) < 0) { + error("sha1 mismatch %s\n", sha1_to_hex(sha1)); + return NULL; + } obj = parse_object_buffer(sha1, type, size, buffer, &eaten); if (!eaten)