Skip to content

Commit bdd8bcb

Browse files
jeffhostetlermjcheetham
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 <[email protected]>
1 parent 13afa3c commit bdd8bcb

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
@@ -892,7 +892,7 @@ static void sha1_object(const void *data, struct object_entry *obj_entry,
892892
read_lock();
893893
collision_test_needed =
894894
repo_has_object_file_with_flags(the_repository, oid,
895-
OBJECT_INFO_QUICK);
895+
OBJECT_INFO_FOR_PREFETCH);
896896
read_unlock();
897897
}
898898

0 commit comments

Comments
 (0)