summary refs log tree commit diff
path: root/bloom.c
diff options
context:
space:
mode:
authorDerrick Stolee <dstolee@microsoft.com>2020-04-09 13:00:11 +0000
committerJunio C Hamano <gitster@pobox.com>2020-04-09 11:04:35 -0700
commitcaf388caa101be90b7ec43d7f78ca4e935fc0150 (patch)
treeddb2c2a65d6994420c076140600c568a7740429b /bloom.c
parentd5b873c832d832e44523d1d2a9d29afe2b84c84f (diff)
bloom: ignore renames when computing changed paths
The changed-path Bloom filters record an entry in the filter for
every path that was changed. This includes every add and delete,
regardless of whether a rename was detected. Detecting renames
causes significant performance issues, but also will trigger
downloading missing blobs in partial clone.

The simple fix is to disable rename detection when computing a
changed-path Bloom filter. This should already be disabled by
default, but it is good to explicitly enforce the intended
behavior.

Signed-off-by: Derrick Stolee <dstolee@microsoft.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'bloom.c')
-rw-r--r--bloom.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/bloom.c b/bloom.c
index c5b461d1cf..dd9bab9bbd 100644
--- a/bloom.c
+++ b/bloom.c
@@ -189,6 +189,7 @@ struct bloom_filter *get_bloom_filter(struct repository *r,
 
 	repo_diff_setup(r, &diffopt);
 	diffopt.flags.recursive = 1;
+	diffopt.detect_rename = 0;
 	diffopt.max_changes = max_changes;
 	diff_setup_done(&diffopt);