Support for the OBJECT_INFO_QUICK flag in sha1_object_info_extended()
was added in commit
dfdd4afcf9 ("sha1_file: teach
sha1_object_info_extended more flags", 2017-06-26) in order to support
commit
e83e71c5e1 ("sha1_file: refactor has_sha1_file_with_flags",
2017-06-26), but it was inadvertently removed in commit
8b4c0103a9
("sha1_file: support lazily fetching missing objects", 2017-12-08).
Restore this functionality.
Signed-off-by: Jonathan Tan <jonathantanmy@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
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 &&