diff options
author | Nanako Shiraishi <nanako3@lavabit.com> | 2009-01-24 10:18:02 +0900 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2009-01-25 18:56:13 -0800 |
commit | a79ec62d064e32b5c3979a16d215fdb70fe965c0 (patch) | |
tree | e08668c5bef03d045bb4d32ccbef4ad766951be7 /t/t4150-am.sh | |
parent | 3f01ad665493e09aa816d84a872d9874f33a8c16 (diff) | |
download | git-a79ec62d064e32b5c3979a16d215fdb70fe965c0.tar.gz |
git-am: Add --ignore-date option
This new option tells 'git-am' to ignore the date header field
recorded in the format-patch output. The commits will have the
timestamp when they are created instead.
You can work a lot in one day to accumulate many changes, but
apply and push to the public repository only some of them at
the end of the first day. Then next day you can spend all your
working hours reading comics or chatting with your coworkers,
and apply your remaining patches from the previous day using
this option to pretend that you have been working at the end
of the day.
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 | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/t/t4150-am.sh b/t/t4150-am.sh index 8d3fb00cd9..5e65afa0c1 100755 --- a/t/t4150-am.sh +++ b/t/t4150-am.sh @@ -277,4 +277,17 @@ test_expect_success 'am without --committer-date-is-author-date' ' test "$at" != "$ct" ' +# This checks for +0000 because TZ is set to UTC and that should +# show up when the current time is used. The date in message is set +# by test_tick that uses -0700 timezone; if this feature does not +# work, we will see that instead of +0000. +test_expect_success 'am --ignore-date' ' + git checkout first && + test_tick && + git am --ignore-date patch1 && + git cat-file commit HEAD | sed -e "/^$/q" >head1 && + at=$(sed -ne "/^author /s/.*> //p" head1) && + echo "$at" | grep "+0000" +' + test_done |