commit-graph: test --split across alternate without --split
[gitweb.git] / t / t5324-split-commit-graph.sh
index 704def70bbce3ae974ee3a9707377f076ae7aa08..130f2baf44d7a305a2c0e78ff80b9c0d140a7e74 100755 (executable)
@@ -301,4 +301,19 @@ test_expect_success 'add octopus merge' '
 
 graph_git_behavior 'graph exists' merge/octopus commits/12
 
+test_expect_success 'split across alternate where alternate is not split' '
+       git commit-graph write --reachable &&
+       test_path_is_file .git/objects/info/commit-graph &&
+       cp .git/objects/info/commit-graph . &&
+       git clone --no-hardlinks . alt-split &&
+       (
+               cd alt-split &&
+               echo "$(pwd)"/../.git/objects >.git/objects/info/alternates &&
+               test_commit 18 &&
+               git commit-graph write --reachable --split &&
+               test_line_count = 1 $graphdir/commit-graph-chain
+       ) &&
+       test_cmp commit-graph .git/objects/info/commit-graph
+'
+
 test_done