diff options
author | Jonathan Tan <jonathantanmy@google.com> | 2018-03-13 16:30:29 +0100 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2018-03-13 20:11:04 +0100 |
commit | 2b7750c923636b75d74936089af0a0a68f5b1596 (patch) | |
tree | b8beced0f60050eab539499ba507b0bd958762ce /sha1_file.c | |
parent | gc: do not repack promisor packfiles (diff) | |
download | git-2b7750c923636b75d74936089af0a0a68f5b1596.tar.xz git-2b7750c923636b75d74936089af0a0a68f5b1596.zip |
sha1_file: restore OBJECT_INFO_QUICK functionality
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>
Diffstat (limited to 'sha1_file.c')
-rw-r--r-- | sha1_file.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/sha1_file.c b/sha1_file.c index dd956e2bb6..b0735dc03d 100644 --- a/sha1_file.c +++ b/sha1_file.c @@ -1189,9 +1189,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 && |