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>
This commit is contained in:
Derrick Stolee 2019-06-18 11:14:34 -07:00 коммит произвёл Junio C Hamano
Родитель ba41112a63
Коммит e2017c48fe
1 изменённых файлов: 11 добавлений и 0 удалений

Просмотреть файл

@ -290,4 +290,15 @@ test_expect_success 'verify after commit-graph-chain corruption' '
)
'
test_expect_success 'add octopus merge' '
git reset --hard commits/10 &&
git merge commits/3 commits/4 &&
git branch merge/octopus &&
git commit-graph write --reachable --split &&
git commit-graph verify &&
test_line_count = 3 $graphdir/commit-graph-chain
'
graph_git_behavior 'graph exists' merge/octopus commits/12
test_done