Merge branch 'jh/fsck-promisors' into next
authorJunio C Hamano <gitster@pobox.com>
Thu, 15 Mar 2018 22:10:58 +0000 (15:10 -0700)
committerJunio C Hamano <gitster@pobox.com>
Thu, 15 Mar 2018 22:10:58 +0000 (15:10 -0700)
A hotfix to a topic that graduated recently.

* jh/fsck-promisors:
sha1_file: restore OBJECT_INFO_QUICK functionality

sha1_file.c
index 89a8c1bad039a578742ad4dd95394379d0686db4..669aadf2e0464c5021aa1f2a2ad5ac81b9988d1d 100644 (file)
@@ -1263,9 +1263,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 &&