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