X-Git-Url: http://git.ipfire.org/?p=thirdparty%2Fgit.git;a=blobdiff_plain;f=sha1_file.c;h=53f0a3693fef1e03659cf3b41d15246ad419911e;hp=1b94f39c4c5653b090d5dbecf0cf7a785b0556bb;hb=bdfef0492cada3fb36f454804796bf12c79a7136;hpb=cd3d56a9624f4e52cfefbf11593d08e0ce8e9133 diff --git a/sha1_file.c b/sha1_file.c index 1b94f39c4c..53f0a3693f 100644 --- a/sha1_file.c +++ b/sha1_file.c @@ -1267,9 +1267,11 @@ int sha1_object_info_extended(const unsigned char *sha1, struct object_info *oi, return 0; /* Not a loose object; someone else may have just packed it. */ - reprepare_packed_git(); - if (find_pack_entry(real, &e)) - break; + if (!(flags & OBJECT_INFO_QUICK)) { + reprepare_packed_git(); + if (find_pack_entry(real, &e)) + break; + } /* Check if it is a missing object */ if (fetch_if_missing && repository_format_partial_clone && @@ -2207,7 +2209,7 @@ int read_loose_object(const char *path, goto out; } - if (*type == OBJ_BLOB) { + if (*type == OBJ_BLOB && *size > big_file_threshold) { if (check_stream_sha1(&stream, hdr, *size, path, expected_sha1) < 0) goto out; } else {