Skip to content

Commit 6494066

Browse files
committed
Merge branch 'jh/fsck-promisors'
A hotfix to a topic that graduated recently. * jh/fsck-promisors: sha1_file: restore OBJECT_INFO_QUICK functionality
2 parents beb2cdf + 2b7750c commit 6494066

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

sha1_file.c

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1267,9 +1267,11 @@ int sha1_object_info_extended(const unsigned char *sha1, struct object_info *oi,
12671267
return 0;
12681268

12691269
/* Not a loose object; someone else may have just packed it. */
1270-
reprepare_packed_git();
1271-
if (find_pack_entry(real, &e))
1272-
break;
1270+
if (!(flags & OBJECT_INFO_QUICK)) {
1271+
reprepare_packed_git();
1272+
if (find_pack_entry(real, &e))
1273+
break;
1274+
}
12731275

12741276
/* Check if it is a missing object */
12751277
if (fetch_if_missing && repository_format_partial_clone &&

0 commit comments

Comments
 (0)