X-Git-Url: http://git.ipfire.org/?a=blobdiff_plain;f=commit-graph.c;h=fc4a43b8d6eb112f1c845882b32411c37a402e3b;hb=5efabc7ed9e57bb73159d1ad7739c508167ef24a;hp=6ae2009a96ab4ffa3f508ee477056f718119210a;hpb=417056578a76f87f8175c7b315e35ca2fb92a0aa;p=thirdparty%2Fgit.git diff --git a/commit-graph.c b/commit-graph.c index 6ae2009a96..fc4a43b8d6 100644 --- a/commit-graph.c +++ b/commit-graph.c @@ -1533,8 +1533,8 @@ static int write_commit_graph_file(struct write_commit_graph_context *ctx) static void split_graph_merge_strategy(struct write_commit_graph_context *ctx) { - struct commit_graph *g = ctx->r->objects->commit_graph; - uint32_t num_commits = ctx->commits.nr; + struct commit_graph *g; + uint32_t num_commits; uint32_t i; int max_commits = 0; @@ -1546,6 +1546,7 @@ static void split_graph_merge_strategy(struct write_commit_graph_context *ctx) } g = ctx->r->objects->commit_graph; + num_commits = ctx->commits.nr; ctx->num_commit_graphs_after = ctx->num_commit_graphs_before + 1; while (g && (g->num_commits <= size_mult * num_commits ||