Skip to content

Commit a99263f

Browse files
jeffhostetlerdscho
authored andcommitted
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 <jeffhost@microsoft.com>
1 parent 305d774 commit a99263f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

builtin/index-pack.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -889,7 +889,7 @@ static void sha1_object(const void *data, struct object_entry *obj_entry,
889889
read_lock();
890890
collision_test_needed =
891891
repo_has_object_file_with_flags(the_repository, oid,
892-
OBJECT_INFO_QUICK);
892+
OBJECT_INFO_FOR_PREFETCH);
893893
read_unlock();
894894
}
895895

0 commit comments

Comments
 (0)