diff options
author | Junio C Hamano <gitster@pobox.com> | 2020-09-29 14:01:20 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2020-09-29 14:01:20 -0700 |
commit | 288ed98bf768f4df9b569d51a52c233a1402c0f5 (patch) | |
tree | 671cd2dddfb6b1adc8a9d1c7b516f4f5622bd092 /revision.c | |
parent | c5a8f1efc03746fd6b6c71fef8e3a5c38ce4e2e8 (diff) | |
parent | d356d5debe56b1e43b5ca674c662a08f25176f05 (diff) | |
download | git-288ed98bf768f4df9b569d51a52c233a1402c0f5.tar.gz |
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 'revision.c')
-rw-r--r-- | revision.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/revision.c b/revision.c index 067030e64c..d9dc5781ac 100644 --- a/revision.c +++ b/revision.c @@ -681,10 +681,7 @@ static void prepare_to_use_bloom_filter(struct rev_info *revs) repo_parse_commit(revs->repo, revs->commits->item); - if (!revs->repo->objects->commit_graph) - return; - - revs->bloom_filter_settings = revs->repo->objects->commit_graph->bloom_filter_settings; + revs->bloom_filter_settings = get_bloom_filter_settings(revs->repo); if (!revs->bloom_filter_settings) return; @@ -755,7 +752,7 @@ static int check_maybe_different_in_bloom_filter(struct rev_info *revs, if (commit_graph_generation(commit) == GENERATION_NUMBER_INFINITY) return -1; - filter = get_bloom_filter(revs->repo, commit, 0); + filter = get_bloom_filter(revs->repo, commit); if (!filter) { count_bloom_filter_not_present++; |