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 <dstolee@microsoft.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Derrick Stolee committed Jun 18, 2019 at 11:14 UTC e2017c48fe95d44f95bc4e9f36e2210dff698c40
1 file changed +11
t/t5324-split-commit-graph.sh
+11
@@ -290,4 +290,15 @@ test_expect_success 'verify after commit-graph-chain corruption' '
290 )
291 '
292
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 +
304 test_done