]> git.ipfire.org Git - thirdparty/git.git/commitdiff
Merge branch 'tb/bloom-improvements'
authorJunio C Hamano <gitster@pobox.com>
Tue, 29 Sep 2020 21:01:20 +0000 (14:01 -0700)
committerJunio C Hamano <gitster@pobox.com>
Tue, 29 Sep 2020 21:01:20 +0000 (14:01 -0700)
"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=<n>'
  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()'

13 files changed:
1  2 
Documentation/config.txt
Documentation/technical/commit-graph-format.txt
blame.c
commit-graph.c
commit-graph.h
diff.h
line-log.c
repo-settings.c
repository.h
revision.c
t/helper/test-bloom.c
t/t4216-log-bloom.sh
t/t5324-split-commit-graph.sh

Simple merge
diff --cc blame.c
Simple merge
diff --cc commit-graph.c
index 695c1cf7a3911292f2954ff3164c0f8931a13c24,1aedc1c4df45299445cf03f1f45383a86051c57d..cb042bdba8c83288cfc1e42853447d5bc06f47fe
@@@ -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 commit-graph.h
Simple merge
diff --cc diff.h
Simple merge
diff --cc line-log.c
Simple merge
diff --cc repo-settings.c
Simple merge
diff --cc repository.h
Simple merge
diff --cc revision.c
Simple merge
Simple merge
index 4bb9e9dbe28bf22d86d7e4ef8629d4f73328d815,023031d587d6a298eb91abe4af8906794129a244..d11040ce41c65d8bd2b5e14dda5b9044e18c6893
@@@ -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-graph write --reachable --changed-paths
+       git commit --allow-empty -m "empty" &&
 +      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
Simple merge