From: Junio C Hamano Date: Thu, 30 Jul 2020 20:20:30 +0000 (-0700) Subject: Merge branch 'sg/commit-graph-cleanups' into master X-Git-Tag: v2.29.0-rc0~220 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=de6dda0dc3d95cd9aaf43a7b85ceeb57316dcc27;p=thirdparty%2Fgit.git Merge branch 'sg/commit-graph-cleanups' into master The changed-path Bloom filter is improved using ideas from an independent implementation. * sg/commit-graph-cleanups: commit-graph: simplify write_commit_graph_file() #2 commit-graph: simplify write_commit_graph_file() #1 commit-graph: simplify parse_commit_graph() #2 commit-graph: simplify parse_commit_graph() #1 commit-graph: clean up #includes diff.h: drop diff_tree_oid() & friends' return value commit-slab: add a function to deep free entries on the slab commit-graph-format.txt: all multi-byte numbers are in network byte order commit-graph: fix parsing the Chunk Lookup table tree-walk.c: don't match submodule entries for 'submod/anything' --- de6dda0dc3d95cd9aaf43a7b85ceeb57316dcc27 diff --cc commit-graph.c index 1af68c297d,887837e882..1f37097dff --- a/commit-graph.c +++ b/commit-graph.c @@@ -415,17 -366,9 +417,8 @@@ struct commit_graph *parse_commit_graph if (chunk_repeated) { error(_("commit-graph chunk id %08x appears multiple times"), chunk_id); - free(graph); - return NULL; + goto free_and_return; } - - if (last_chunk_id == GRAPH_CHUNKID_OIDLOOKUP) - { - graph->num_commits = (chunk_offset - last_chunk_offset) - / graph->hash_len; - } - - last_chunk_id = chunk_id; - last_chunk_offset = chunk_offset; } if (graph->chunk_bloom_indexes && graph->chunk_bloom_data) { diff --cc commit-graph.h index 28f89cdf3e,881c9b46e5..cf8d3c9647 --- a/commit-graph.h +++ b/commit-graph.h @@@ -2,11 -2,7 +2,8 @@@ #define COMMIT_GRAPH_H #include "git-compat-util.h" - #include "repository.h" - #include "string-list.h" - #include "cache.h" #include "object-store.h" +#include "oidset.h" #define GIT_TEST_COMMIT_GRAPH "GIT_TEST_COMMIT_GRAPH" #define GIT_TEST_COMMIT_GRAPH_DIE_ON_LOAD "GIT_TEST_COMMIT_GRAPH_DIE_ON_LOAD"