Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTaylor Blau <me@ttaylorr.com>2020-09-18 05:59:57 +0300
committerJunio C Hamano <gitster@pobox.com>2020-09-18 20:39:22 +0300
commitd356d5debe56b1e43b5ca674c662a08f25176f05 (patch)
tree03e69433cd878a92e5fa9f344a7b9c861cdf5a81 /t/t4216-log-bloom.sh
parent809e0327f579267ea78a1b2f727d3b63c1f5d044 (diff)
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-xt/t4216-log-bloom.sh24
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" &&