]> git.ipfire.org Git - thirdparty/git.git/blobdiff - t/t5000-tar-tree.sh
Merge branch 'js/range-diff-wo-dotdot'
[thirdparty/git.git] / t / t5000-tar-tree.sh
index 3ebb0d3b6520b7813dd7a1cc20409d2ed779c9e1..7204799a0b52a027cf57a0c83cd9818f69a4ad8b 100755 (executable)
@@ -431,15 +431,33 @@ test_expect_success TAR_HUGE,LONG_IS_64BIT 'system tar can read our huge size' '
        test_cmp expect actual
 '
 
-test_expect_success TIME_IS_64BIT 'set up repository with far-future commit' '
+test_expect_success TIME_IS_64BIT 'set up repository with far-future (2^34 - 1) commit' '
+       rm -f .git/index &&
+       echo foo >file &&
+       git add file &&
+       GIT_COMMITTER_DATE="@17179869183 +0000" \
+               git commit -m "tempori parendum"
+'
+
+test_expect_success TIME_IS_64BIT 'generate tar with far-future mtime' '
+       git archive HEAD >future.tar
+'
+
+test_expect_success TAR_HUGE,TIME_IS_64BIT,TIME_T_IS_64BIT 'system tar can read our future mtime' '
+       echo 2514 >expect &&
+       tar_info future.tar | cut -d" " -f2 >actual &&
+       test_cmp expect actual
+'
+
+test_expect_success TIME_IS_64BIT 'set up repository with far-far-future (2^36 + 1) commit' '
        rm -f .git/index &&
        echo content >file &&
        git add file &&
-       GIT_COMMITTER_DATE="@68719476737 +0000" \
+       GIT_TEST_COMMIT_GRAPH=0 GIT_COMMITTER_DATE="@68719476737 +0000" \
                git commit -m "tempori parendum"
 '
 
-test_expect_success TIME_IS_64BIT 'generate tar with future mtime' '
+test_expect_success TIME_IS_64BIT 'generate tar with far-far-future mtime' '
        git archive HEAD >future.tar
 '