X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=object.c;h=fe8eaaf19f71b48d9acba83594d918fc4875f5c4;hb=7da4e2280ccaf5ecb357f7cb2b81d62f78f00f9e;hp=a6ef439192c1083e367f0a86cb10d93564fc9481;hpb=725cf7b45da1f983fa1cbb0757b0e8855e5ac2de;p=git.git diff --git a/object.c b/object.c index a6ef43919..fe8eaaf19 100644 --- a/object.c +++ b/object.c @@ -188,17 +188,18 @@ struct object *parse_object(const unsigned char *sha1) unsigned long size; enum object_type type; int eaten; - void *buffer = read_sha1_file(sha1, &type, &size); + const unsigned char *repl; + void *buffer = read_sha1_file_repl(sha1, &type, &size, &repl); if (buffer) { struct object *obj; - if (check_sha1_signature(sha1, buffer, size, typename(type)) < 0) { + if (check_sha1_signature(repl, buffer, size, typename(type)) < 0) { free(buffer); - error("sha1 mismatch %s\n", sha1_to_hex(sha1)); + error("sha1 mismatch %s\n", sha1_to_hex(repl)); return NULL; } - obj = parse_object_buffer(sha1, type, size, buffer, &eaten); + obj = parse_object_buffer(repl, type, size, buffer, &eaten); if (!eaten) free(buffer); return obj;