Skip to content

Commit e2017c4

Browse files
derrickstoleegitster
authored andcommitted
commit-graph: test octopus merges with --split
Octopus merges require an extra chunk of data in the commit-graph file format. Create a test that ensures the new --split option continues to work with an octopus merge. Specifically, ensure that the octopus merge has parents across layers to truly check that our graph position logic holds up correctly. Signed-off-by: Derrick Stolee <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent ba41112 commit e2017c4

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

t/t5324-split-commit-graph.sh

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -290,4 +290,15 @@ test_expect_success 'verify after commit-graph-chain corruption' '
290290
)
291291
'
292292

293+
test_expect_success 'add octopus merge' '
294+
git reset --hard commits/10 &&
295+
git merge commits/3 commits/4 &&
296+
git branch merge/octopus &&
297+
git commit-graph write --reachable --split &&
298+
git commit-graph verify &&
299+
test_line_count = 3 $graphdir/commit-graph-chain
300+
'
301+
302+
graph_git_behavior 'graph exists' merge/octopus commits/12
303+
293304
test_done

0 commit comments

Comments
 (0)