Skip to content

Commit 3fa0fed

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 <[email protected]>
1 parent 115ffd2 commit 3fa0fed

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
@@ -894,7 +894,7 @@ static void sha1_object(const void *data, struct object_entry *obj_entry,
894894
if (startup_info->have_repository) {
895895
read_lock();
896896
collision_test_needed = odb_has_object(the_repository->objects, oid,
897-
HAS_OBJECT_FETCH_PROMISOR);
897+
OBJECT_INFO_FOR_PREFETCH);
898898
read_unlock();
899899
}
900900

0 commit comments

Comments
 (0)