diff options
| author | Junio C Hamano <gitster@pobox.com> | 2019-10-09 14:01:00 +0900 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2019-10-09 14:01:00 +0900 |
| commit | 6e12570822a904e2be554b05755c08f4d24be7e9 (patch) | |
| tree | b6d276fd5205c5adb7a02c7bac6ba201b3ab3ac3 /commit-graph.c | |
| parent | Merge branch 'js/diff-rename-force-stable-sort' (diff) | |
| parent | git_mkstemps_mode(): replace magic numbers with computed value (diff) | |
| download | git-6e12570822a904e2be554b05755c08f4d24be7e9.tar.gz git-6e12570822a904e2be554b05755c08f4d24be7e9.zip | |
Merge branch 'ah/cleanups'
Miscellaneous code clean-ups.
* ah/cleanups:
git_mkstemps_mode(): replace magic numbers with computed value
wrapper: use a loop instead of repetitive statements
diffcore-break: use a goto instead of a redundant if statement
commit-graph: remove a duplicate assignment
Diffstat (limited to 'commit-graph.c')
| -rw-r--r-- | commit-graph.c | 5 |
1 files changed, 3 insertions, 2 deletions
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 || |
