From 1095cd42be677b736dae065b0e8d217f93033aae Mon Sep 17 00:00:00 2001 From: Jeff Hostetler Date: Tue, 24 Sep 2019 15:51:16 -0400 Subject: [PATCH] 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 --- builtin/index-pack.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/builtin/index-pack.c b/builtin/index-pack.c index a3a37bd215d844..c6163c3684157a 100644 --- a/builtin/index-pack.c +++ b/builtin/index-pack.c @@ -810,7 +810,7 @@ static void sha1_object(const void *data, struct object_entry *obj_entry, read_lock(); collision_test_needed = repo_has_object_file_with_flags(the_repository, oid, - OBJECT_INFO_QUICK); + OBJECT_INFO_FOR_PREFETCH); read_unlock(); }