From: Junio C Hamano Date: Mon, 2 Nov 2020 21:17:39 +0000 (-0800) Subject: Merge branch 'ds/commit-graph-merging-fix' X-Git-Tag: v2.30.0-rc0~138 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=307a53dd9914f65c9b6399221574e24234e4b49f;p=thirdparty%2Fgit.git Merge branch 'ds/commit-graph-merging-fix' When "git commit-graph" detects the same commit recorded more than once while it is merging the layers, it used to die. The code now ignores all but one of them and continues. * ds/commit-graph-merging-fix: commit-graph: don't write commit-graph when disabled commit-graph: ignore duplicates when merging layers --- 307a53dd9914f65c9b6399221574e24234e4b49f diff --cc commit-graph.c index cb042bdba8,33b3a2086c..6f62a07313 --- a/commit-graph.c +++ b/commit-graph.c @@@ -2148,8 -2061,12 +2158,13 @@@ int write_commit_graph(struct object_di uint32_t i, count_distinct = 0; int res = 0; int replace = 0; + struct bloom_filter_settings bloom_settings = DEFAULT_BLOOM_FILTER_SETTINGS; + prepare_repo_settings(the_repository); + if (!the_repository->settings.core_commit_graph) { + warning(_("attempting to write a commit-graph, but 'core.commitGraph' is disabled")); + return 0; + } if (!commit_graph_compatible(the_repository)) return 0;