From: Junio C Hamano Date: Mon, 22 Mar 2021 21:00:23 +0000 (-0700) Subject: Merge branch 'ds/commit-graph-generation-config' X-Git-Tag: v2.32.0-rc0~150 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=d20fa3cf9dba095b9d8836b177da697425ce8d3c;p=thirdparty%2Fgit.git Merge branch 'ds/commit-graph-generation-config' A new configuration variable has been introduced to allow choosing which version of the generation number gets used in the commit-graph file. * ds/commit-graph-generation-config: commit-graph: use config to specify generation type commit-graph: create local repository pointer --- d20fa3cf9dba095b9d8836b177da697425ce8d3c diff --cc commit-graph.c index e21eeea42b,1e9b88c003..f18380b922 --- a/commit-graph.c +++ b/commit-graph.c @@@ -2235,11 -2176,11 +2244,11 @@@ int write_commit_graph(struct object_di warning(_("attempting to write a commit-graph, but 'core.commitGraph' is disabled")); return 0; } - if (!commit_graph_compatible(the_repository)) + if (!commit_graph_compatible(r)) return 0; - ctx = xcalloc(1, sizeof(struct write_commit_graph_context)); + CALLOC_ARRAY(ctx, 1); - ctx->r = the_repository; + ctx->r = r; ctx->odb = odb; ctx->append = flags & COMMIT_GRAPH_WRITE_APPEND ? 1 : 0; ctx->report_progress = flags & COMMIT_GRAPH_WRITE_PROGRESS ? 1 : 0;