]> git.ipfire.org Git - thirdparty/git.git/blobdiff - t/t5328-commit-graph-64bit-time.sh
commit-graph: fix generation number v2 overflow values
[thirdparty/git.git] / t / t5328-commit-graph-64bit-time.sh
index 28114bcaf47fb9b14b50ded5322868d2e73b9734..093f0c067af6801e3334152fe65b7c4495830d30 100755 (executable)
@@ -36,4 +36,31 @@ test_expect_success 'lower layers have overflow chunk' '
 
 graph_git_behavior 'overflow' '' HEAD~2 HEAD
 
+test_expect_success 'set up and verify repo with generation data overflow chunk' '
+       mkdir repo &&
+       cd repo &&
+       git init &&
+       test_commit --date "$UNIX_EPOCH_ZERO" 1 &&
+       test_commit 2 &&
+       test_commit --date "$UNIX_EPOCH_ZERO" 3 &&
+       git commit-graph write --reachable &&
+       graph_read_expect 3 generation_data &&
+       test_commit --date "$FUTURE_DATE" 4 &&
+       test_commit 5 &&
+       test_commit --date "$UNIX_EPOCH_ZERO" 6 &&
+       git branch left &&
+       git reset --hard 3 &&
+       test_commit 7 &&
+       test_commit --date "$FUTURE_DATE" 8 &&
+       test_commit 9 &&
+       git branch right &&
+       git reset --hard 3 &&
+       test_merge M left right &&
+       git commit-graph write --reachable &&
+       graph_read_expect 10 "generation_data generation_data_overflow" &&
+       git commit-graph verify
+'
+
+graph_git_behavior 'overflow 2' repo left right
+
 test_done