X-Git-Url: http://git.ipfire.org/?a=blobdiff_plain;f=t%2Ft6120-describe.sh;h=45047d0a724e6bb7b59b4b3ae155ced530c660d1;hb=6ed610b96840349e9a29c40e60dc926ce03d982b;hp=2b883d8174036b7d2246fcd89f239d7ecde049d4;hpb=34032c4f8fe90aa020f7d85c556312b3d8902f6e;p=thirdparty%2Fgit.git diff --git a/t/t6120-describe.sh b/t/t6120-describe.sh index 2b883d8174..45047d0a72 100755 --- a/t/t6120-describe.sh +++ b/t/t6120-describe.sh @@ -424,4 +424,19 @@ test_expect_success 'describe complains about missing object' ' test_must_fail git describe $ZERO_OID ' +test_expect_success 'name-rev a rev shortly after epoch' ' + test_when_finished "git checkout master" && + + git checkout --orphan no-timestamp-underflow && + # Any date closer to epoch than the CUTOFF_DATE_SLOP constant + # in builtin/name-rev.c. + GIT_COMMITTER_DATE="@1234 +0000" \ + git commit -m "committer date shortly after epoch" && + old_commit_oid=$(git rev-parse HEAD) && + + echo "$old_commit_oid no-timestamp-underflow" >expect && + git name-rev $old_commit_oid >actual && + test_cmp expect actual +' + test_done