Merge branch 'ds/commit-graph-bloom-updates' into master
Updates to the changed-paths bloom filter. * ds/commit-graph-bloom-updates: commit-graph: check all leading directories in changed path Bloom filters revision: empty pathspecs should not use Bloom filters revision.c: fix whitespace commit-graph: check chunk sizes after writing commit-graph: simplify chunk writes into loop commit-graph: unify the signatures of all write_graph_chunk_*() functions commit-graph: persist existence of changed-paths bloom: fix logic in get_bloom_filter() commit-graph: change test to die on parse, not load commit-graph: place bloom_settings in context
This commit is contained in:
14
bloom.c
14
bloom.c
@@ -187,7 +187,7 @@ struct bloom_filter *get_bloom_filter(struct repository *r,
|
||||
struct diff_options diffopt;
|
||||
int max_changes = 512;
|
||||
|
||||
if (bloom_filters.slab_size == 0)
|
||||
if (!bloom_filters.slab_size)
|
||||
return NULL;
|
||||
|
||||
filter = bloom_filter_slab_at(&bloom_filters, c);
|
||||
@@ -195,16 +195,14 @@ struct bloom_filter *get_bloom_filter(struct repository *r,
|
||||
if (!filter->data) {
|
||||
load_commit_graph_info(r, c);
|
||||
if (commit_graph_position(c) != COMMIT_NOT_FROM_GRAPH &&
|
||||
r->objects->commit_graph->chunk_bloom_indexes) {
|
||||
if (load_bloom_filter_from_graph(r->objects->commit_graph, filter, c))
|
||||
return filter;
|
||||
else
|
||||
return NULL;
|
||||
}
|
||||
r->objects->commit_graph->chunk_bloom_indexes)
|
||||
load_bloom_filter_from_graph(r->objects->commit_graph, filter, c);
|
||||
}
|
||||
|
||||
if (filter->data || !compute_if_not_present)
|
||||
if (filter->data)
|
||||
return filter;
|
||||
if (!compute_if_not_present)
|
||||
return NULL;
|
||||
|
||||
repo_diff_setup(r, &diffopt);
|
||||
diffopt.flags.recursive = 1;
|
||||
|
||||
Reference in New Issue
Block a user