diff options
author | Taylor Blau <me@ttaylorr.com> | 2020-09-18 04:59:57 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2020-09-18 19:39:22 +0200 |
commit | d356d5debe56b1e43b5ca674c662a08f25176f05 (patch) | |
tree | 03e69433cd878a92e5fa9f344a7b9c861cdf5a81 /t/t4216-log-bloom.sh | |
parent | builtin/commit-graph.c: introduce '--max-new-filters=<n>' (diff) | |
download | git-d356d5debe56b1e43b5ca674c662a08f25176f05.tar.xz git-d356d5debe56b1e43b5ca674c662a08f25176f05.zip |
commit-graph: introduce 'commitGraph.maxNewFilters'
Introduce a configuration variable to specify a default value for the
recently-introduce '--max-new-filters' option of 'git commit-graph
write'.
Helped-by: Junio C Hamano <gitster@pobox.com>
Signed-off-by: Taylor Blau <me@ttaylorr.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t4216-log-bloom.sh')
-rwxr-xr-x | t/t4216-log-bloom.sh | 24 |
1 files changed, 23 insertions, 1 deletions
diff --git a/t/t4216-log-bloom.sh b/t/t4216-log-bloom.sh index 48ab1b16a6..023031d587 100755 --- a/t/t4216-log-bloom.sh +++ b/t/t4216-log-bloom.sh @@ -325,13 +325,15 @@ test_expect_success 'Bloom generation is limited by --max-new-filters' ' ' test_expect_success 'Bloom generation backfills previously-skipped filters' ' + # Check specifying commitGraph.maxNewFilters over "git config" works. + test_config -C limits commitGraph.maxNewFilters 1 && ( cd limits && rm -f trace.event && GIT_TRACE2_EVENT="$(pwd)/trace.event" \ git commit-graph write --reachable --changed-paths \ - --split=replace --max-new-filters=1 && + --split=replace && test_filter_computed 1 trace.event && test_filter_not_computed 4 trace.event && test_filter_trunc_empty 0 trace.event && @@ -339,6 +341,26 @@ test_expect_success 'Bloom generation backfills previously-skipped filters' ' ) ' +test_expect_success '--max-new-filters overrides configuration' ' + git init override && + test_when_finished "rm -fr override" && + test_config -C override commitGraph.maxNewFilters 2 && + ( + cd override && + test_commit one && + test_commit two && + + rm -f trace.event && + GIT_TRACE2_EVENT="$(pwd)/trace.event" \ + git commit-graph write --reachable --changed-paths \ + --max-new-filters=1 && + test_filter_computed 1 trace.event && + test_filter_not_computed 1 trace.event && + test_filter_trunc_empty 0 trace.event && + test_filter_trunc_large 0 trace.event + ) +' + test_expect_success 'Bloom generation backfills empty commits' ' git init empty && test_when_finished "rm -fr empty" && |