Skip to content

Commit 037f067

Browse files
committed
Merge branch 'ds/commit-graph-set-size-mult'
The code to write split commit-graph file(s) upon fetching computed bogus value for the parameter used in splitting the resulting files, which has been corrected. * ds/commit-graph-set-size-mult: commit-graph: prefer default size_mult when given zero
2 parents f25f04e + 63020f1 commit 037f067

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

builtin/fetch.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1866,15 +1866,13 @@ int cmd_fetch(int argc, const char **argv, const char *prefix)
18661866
(fetch_write_commit_graph < 0 &&
18671867
the_repository->settings.fetch_write_commit_graph)) {
18681868
int commit_graph_flags = COMMIT_GRAPH_WRITE_SPLIT;
1869-
struct split_commit_graph_opts split_opts;
1870-
memset(&split_opts, 0, sizeof(struct split_commit_graph_opts));
18711869

18721870
if (progress)
18731871
commit_graph_flags |= COMMIT_GRAPH_WRITE_PROGRESS;
18741872

18751873
write_commit_graph_reachable(get_object_directory(),
18761874
commit_graph_flags,
1877-
&split_opts);
1875+
NULL);
18781876
}
18791877

18801878
close_object_store(the_repository->objects);

commit-graph.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1542,7 +1542,9 @@ static void split_graph_merge_strategy(struct write_commit_graph_context *ctx)
15421542

15431543
if (ctx->split_opts) {
15441544
max_commits = ctx->split_opts->max_commits;
1545-
size_mult = ctx->split_opts->size_multiple;
1545+
1546+
if (ctx->split_opts->size_multiple)
1547+
size_mult = ctx->split_opts->size_multiple;
15461548
}
15471549

15481550
g = ctx->r->objects->commit_graph;

0 commit comments

Comments
 (0)