Skip to content

Commit dbacef4

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 98f37e6 commit dbacef4

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
@@ -812,7 +812,7 @@ static void sha1_object(const void *data, struct object_entry *obj_entry,
812812
read_lock();
813813
collision_test_needed =
814814
repo_has_object_file_with_flags(the_repository, oid,
815-
OBJECT_INFO_QUICK);
815+
OBJECT_INFO_FOR_PREFETCH);
816816
read_unlock();
817817
}
818818

0 commit comments

Comments
 (0)