]> git.ipfire.org Git - thirdparty/git.git/blobdiff - t/t5324-split-commit-graph.sh
Merge branch 'ds/commit-graph-merging-fix'
[thirdparty/git.git] / t / t5324-split-commit-graph.sh
index c334ee9155b12c91b41ac86722e8f666e7b62d0e..4d3842b83b9456362a08842ebc10614d02f0943d 100755 (executable)
@@ -440,4 +440,17 @@ test_expect_success '--split=replace with partial Bloom data' '
        verify_chain_files_exist $graphdir
 '
 
+test_expect_success 'prevent regression for duplicate commits across layers' '
+       git init dup &&
+       git -C dup commit --allow-empty -m one &&
+       git -C dup -c core.commitGraph=false commit-graph write --split=no-merge --reachable 2>err &&
+       test_i18ngrep "attempting to write a commit-graph" err &&
+       git -C dup commit-graph write --split=no-merge --reachable &&
+       git -C dup commit --allow-empty -m two &&
+       git -C dup commit-graph write --split=no-merge --reachable &&
+       git -C dup commit --allow-empty -m three &&
+       git -C dup commit-graph write --split --reachable &&
+       git -C dup commit-graph verify
+'
+
 test_done