From: Junio C Hamano Date: Tue, 29 Sep 2020 21:01:20 +0000 (-0700) Subject: Merge branch 'tb/bloom-improvements' X-Git-Tag: v2.29.0-rc0~39 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=288ed98bf768f4df9b569d51a52c233a1402c0f5;p=thirdparty%2Fgit.git 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=' 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()' --- 288ed98bf768f4df9b569d51a52c233a1402c0f5 diff --cc commit-graph.c index 695c1cf7a3,1aedc1c4df..cb042bdba8 --- a/commit-graph.c +++ b/commit-graph.c @@@ -2042,10 -2083,10 +2090,10 @@@ static void expire_commit_graphs(struc size_t dirnamelen; timestamp_t expire_time = time(NULL); - if (ctx->split_opts && ctx->split_opts->expire_time) - expire_time = ctx->split_opts->expire_time; + if (ctx->opts && ctx->opts->expire_time) + expire_time = ctx->opts->expire_time; if (!ctx->split) { - char *chain_file_name = get_chain_filename(ctx->odb); + char *chain_file_name = get_commit_graph_chain_filename(ctx->odb); unlink(chain_file_name); free(chain_file_name); ctx->num_commit_graphs_after = 0; diff --cc t/t4216-log-bloom.sh index 4bb9e9dbe2,023031d587..d11040ce41 --- a/t/t4216-log-bloom.sh +++ b/t/t4216-log-bloom.sh @@@ -30,13 -30,10 +30,15 @@@ test_expect_success 'setup test - repo rm file_to_be_deleted && git add . && git commit -m "file removed" && + git commit --allow-empty -m "empty" && - git commit-graph write --reachable --changed-paths + git commit-graph write --reachable --changed-paths && + + test_oid_cache <<-EOF + oid_version sha1:1 + oid_version sha256:2 + EOF ' + graph_read_expect () { NUM_CHUNKS=5 cat >expect <<- EOF