Skip to content

Commit 0dd9d84

Browse files
jeffhostetlerderrickstolee
authored andcommittedMar 23, 2020
index-pack: avoid immediate object fetch while parsing packfile
Prevent packfile parsing from accidentally dynamically fetching each individual object found in the packfile. When index-pack parses the input packfile, it does a lookup in the ODB to test for conflicts/collisions. This can accidentally cause the object to be individually fetched when gvfs-helper (or read-object-hook or partial-clone) is enabled. Signed-off-by: Jeff Hostetler <[email protected]>
1 parent 1bc5c4c commit 0dd9d84

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed
 

‎builtin/index-pack.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -782,7 +782,7 @@ static void sha1_object(const void *data, struct object_entry *obj_entry,
782782
if (startup_info->have_repository) {
783783
read_lock();
784784
collision_test_needed =
785-
has_object_file_with_flags(oid, OBJECT_INFO_QUICK);
785+
has_object_file_with_flags(oid, OBJECT_INFO_FOR_PREFETCH);
786786
read_unlock();
787787
}
788788

0 commit comments

Comments
 (0)