diff options
author | Junio C Hamano <gitster@pobox.com> | 2009-01-22 16:14:58 -0800 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2009-01-25 18:55:49 -0800 |
commit | 3f01ad665493e09aa816d84a872d9874f33a8c16 (patch) | |
tree | 6013b63d19bdb3b7626ff76f1ca0f4e330d9b5c2 /t/t4150-am.sh | |
parent | 5dc1308562ab5991ecada68b06707709bea408c9 (diff) | |
download | git-3f01ad665493e09aa816d84a872d9874f33a8c16.tar.gz |
am: Add --committer-date-is-author-date option
This new option tells 'git-am' to use the timestamp recorded
in the Email message as both author and committer date.
Signed-off-by: しらいしななこ <nanako3@lavabit.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t4150-am.sh')
-rwxr-xr-x | t/t4150-am.sh | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/t/t4150-am.sh b/t/t4150-am.sh index 796f795267..8d3fb00cd9 100755 --- a/t/t4150-am.sh +++ b/t/t4150-am.sh @@ -257,4 +257,24 @@ test_expect_success 'am works from file (absolute path given) in subdirectory' ' test -z "$(git diff second)" ' +test_expect_success 'am --committer-date-is-author-date' ' + git checkout first && + test_tick && + git am --committer-date-is-author-date patch1 && + git cat-file commit HEAD | sed -e "/^$/q" >head1 && + at=$(sed -ne "/^author /s/.*> //p" head1) && + ct=$(sed -ne "/^committer /s/.*> //p" head1) && + test "$at" = "$ct" +' + +test_expect_success 'am without --committer-date-is-author-date' ' + git checkout first && + test_tick && + git am patch1 && + git cat-file commit HEAD | sed -e "/^$/q" >head1 && + at=$(sed -ne "/^author /s/.*> //p" head1) && + ct=$(sed -ne "/^committer /s/.*> //p" head1) && + test "$at" != "$ct" +' + test_done |