X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=object.c;h=78a44a6ef4e4823487861c9173f3db4a3fb76e3a;hb=95655d79ad13697e0d68e986d3b0b402efad007a;hp=5b468893421794c50741ce9085c12bc41fb1985f;hpb=597388f6a1c18a117904c307c20542d8a79a1fcd;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)