X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=t%2Ft3400-rebase.sh;h=e647272a01f3ac89e1d08e6b1ffa36a3a543e655;hb=660e20f5c72ba363c08f0d3fca60c9680f296c40;hp=c3555332366d687d04bfbc031b1be808f3caa802;hpb=1a2278084fef2ec6928a3d6504972dbddecbcdee;p=git.git diff --git a/t/t3400-rebase.sh b/t/t3400-rebase.sh index c35553323..e647272a0 100755 --- a/t/t3400-rebase.sh +++ b/t/t3400-rebase.sh @@ -218,4 +218,27 @@ test_expect_success 'rebase -m can copy notes' ' test "a note" = "$(git notes show HEAD)" ' +test_expect_success 'rebase commit with an ancient timestamp' ' + git reset --hard && + + >old.one && git add old.one && test_tick && + git commit --date="@12345 +0400" -m "Old one" && + >old.two && git add old.two && test_tick && + git commit --date="@23456 +0500" -m "Old two" && + >old.three && git add old.three && test_tick && + git commit --date="@34567 +0600" -m "Old three" && + + git cat-file commit HEAD^^ >actual && + grep "author .* 12345 +0400$" actual && + git cat-file commit HEAD^ >actual && + grep "author .* 23456 +0500$" actual && + git cat-file commit HEAD >actual && + grep "author .* 34567 +0600$" actual && + + git rebase --onto HEAD^^ HEAD^ && + + git cat-file commit HEAD >actual && + grep "author .* 34567 +0600$" actual +' + test_done