Merge branch 'ds/commit-graph-octopus-fix'
commit-graph did not handle commits with more than two parents correctly, which has been corrected. * ds/commit-graph-octopus-fix: commit-graph: fix bug around octopus merges
This commit is contained in:
commit
3bcedae27e
@ -1636,7 +1636,7 @@ static void sort_and_scan_merged_commits(struct write_commit_graph_context *ctx)
|
||||
num_parents++;
|
||||
|
||||
if (num_parents > 2)
|
||||
ctx->num_extra_edges += num_parents - 2;
|
||||
ctx->num_extra_edges += num_parents - 1;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -319,7 +319,9 @@ test_expect_success 'add octopus merge' '
|
||||
git merge commits/3 commits/4 &&
|
||||
git branch merge/octopus &&
|
||||
git commit-graph write --reachable --split &&
|
||||
git commit-graph verify &&
|
||||
git commit-graph verify 2>err &&
|
||||
test_line_count = 3 err &&
|
||||
test_i18ngrep ! warning err &&
|
||||
test_line_count = 3 $graphdir/commit-graph-chain
|
||||
'
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user