summaryrefslogtreecommitdiff
path: root/blame.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2020-09-29 21:01:20 (GMT)
committerJunio C Hamano <gitster@pobox.com>2020-09-29 21:01:20 (GMT)
commit288ed98bf768f4df9b569d51a52c233a1402c0f5 (patch)
tree671cd2dddfb6b1adc8a9d1c7b516f4f5622bd092 /blame.c
parentc5a8f1efc03746fd6b6c71fef8e3a5c38ce4e2e8 (diff)
parentd356d5debe56b1e43b5ca674c662a08f25176f05 (diff)
downloadgit-288ed98bf768f4df9b569d51a52c233a1402c0f5.zip
git-288ed98bf768f4df9b569d51a52c233a1402c0f5.tar.gz
git-288ed98bf768f4df9b569d51a52c233a1402c0f5.tar.bz2
Merge branch 'tb/bloom-improvements'
"git commit-graph write" learned to limit the number of bloom filters that are computed from scratch with the --max-new-filters option. * tb/bloom-improvements: commit-graph: introduce 'commitGraph.maxNewFilters' builtin/commit-graph.c: introduce '--max-new-filters=<n>' commit-graph: rename 'split_commit_graph_opts' bloom: encode out-of-bounds filters as non-empty bloom/diff: properly short-circuit on max_changes bloom: use provided 'struct bloom_filter_settings' bloom: split 'get_bloom_filter()' in two commit-graph.c: store maximum changed paths commit-graph: respect 'commitGraph.readChangedPaths' t/helper/test-read-graph.c: prepare repo settings commit-graph: pass a 'struct repository *' in more places t4216: use an '&&'-chain commit-graph: introduce 'get_bloom_filter_settings()'
Diffstat (limited to 'blame.c')
-rw-r--r--blame.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/blame.c b/blame.c
index b475bfa..686845b 100644
--- a/blame.c
+++ b/blame.c
@@ -1276,7 +1276,7 @@ static int maybe_changed_path(struct repository *r,
if (commit_graph_generation(origin->commit) == GENERATION_NUMBER_INFINITY)
return 1;
- filter = get_bloom_filter(r, origin->commit, 0);
+ filter = get_bloom_filter(r, origin->commit);
if (!filter)
return 1;
@@ -2892,16 +2892,18 @@ void setup_blame_bloom_data(struct blame_scoreboard *sb,
const char *path)
{
struct blame_bloom_data *bd;
+ struct bloom_filter_settings *bs;
if (!sb->repo->objects->commit_graph)
return;
- if (!sb->repo->objects->commit_graph->bloom_filter_settings)
+ bs = get_bloom_filter_settings(sb->repo);
+ if (!bs)
return;
bd = xmalloc(sizeof(struct blame_bloom_data));
- bd->settings = sb->repo->objects->commit_graph->bloom_filter_settings;
+ bd->settings = bs;
bd->alloc = 4;
bd->nr = 0;