diff options
author | Taylor Blau <me@ttaylorr.com> | 2020-09-16 14:07:46 -0400 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2020-09-17 09:31:25 -0700 |
commit | 9a7a9ed10d56d6c22a0f16d7baf3f9895c47d693 (patch) | |
tree | 54b3c8c6eaa8edb700dc557c44aac4ddab5de366 /t | |
parent | bloom: split 'get_bloom_filter()' in two (diff) | |
download | tgif-9a7a9ed10d56d6c22a0f16d7baf3f9895c47d693.tar.xz |
bloom: use provided 'struct bloom_filter_settings'
When 'get_or_compute_bloom_filter()' needs to compute a Bloom filter
from scratch, it looks to the default 'struct bloom_filter_settings' in
order to determine the maximum number of changed paths, number of bits
per entry, and so on.
All of these values have so far been constant, and so there was no need
to pass in a pointer from the caller (eg., the one that is stored in the
'struct write_commit_graph_context').
Start passing in a 'struct bloom_filter_settings *' instead of using the
default values to respect graph-specific settings (eg., in the case of
setting 'GIT_TEST_BLOOM_SETTINGS_MAX_CHANGED_PATHS').
In order to have an initialized value for these settings, move its
initialization to earlier in the commit-graph write.
Signed-off-by: Taylor Blau <me@ttaylorr.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't')
-rw-r--r-- | t/helper/test-bloom.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/t/helper/test-bloom.c b/t/helper/test-bloom.c index 531af439c2..4af949164c 100644 --- a/t/helper/test-bloom.c +++ b/t/helper/test-bloom.c @@ -40,6 +40,7 @@ static void get_bloom_filter_for_commit(const struct object_id *commit_oid) setup_git_directory(); c = lookup_commit(the_repository, commit_oid); filter = get_or_compute_bloom_filter(the_repository, c, 1, + &settings, NULL); print_bloom_filter(filter); } |