fetch-pack.c: use oidset to check existence of loose object
[gitweb.git] / sha1_file.c
index 1b94f39c4c5653b090d5dbecf0cf7a785b0556bb..c0a19794795caa8bf7c1e5fe8d4094ca57bde41f 100644 (file)
@@ -1262,6 +1262,9 @@ int sha1_object_info_extended(const unsigned char *sha1, struct object_info *oi,
                if (find_pack_entry(real, &e))
                        break;
 
+               if (flags & OBJECT_INFO_IGNORE_LOOSE)
+                       return -1;
+
                /* Most likely it's a loose object. */
                if (!sha1_loose_object_info(real, oi, flags))
                        return 0;