diff options
author | Junio C Hamano <gitster@pobox.com> | 2014-12-22 12:26:52 -0800 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2014-12-22 12:26:52 -0800 |
commit | fa7f51d53385ee64858a415f817d6b8485197405 (patch) | |
tree | 717d8b54cfd65705a67dcd4511849f6311555d2f /t/t4150-am.sh | |
parent | Merge branch 'mh/simplify-repack-without-refs' (diff) | |
parent | git-am: add --message-id/--no-message-id (diff) | |
download | tgif-fa7f51d53385ee64858a415f817d6b8485197405.tar.xz |
Merge branch 'pb/am-message-id-footer'
"git am" learned "--message-id" option to copy the message ID of
the incoming e-mail to the log message of resulting commit.
* pb/am-message-id-footer:
git-am: add --message-id/--no-message-id
git-mailinfo: add --message-id
Diffstat (limited to 't/t4150-am.sh')
-rwxr-xr-x | t/t4150-am.sh | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/t/t4150-am.sh b/t/t4150-am.sh index 5edb79a058..306e6f39ac 100755 --- a/t/t4150-am.sh +++ b/t/t4150-am.sh @@ -85,6 +85,7 @@ test_expect_success setup ' git format-patch --stdout first >patch1 && { + echo "Message-Id: <1226501681-24923-1-git-send-email-bda@mnsspb.ru>" && echo "X-Fake-Field: Line One" && echo "X-Fake-Field: Line Two" && echo "X-Fake-Field: Line Three" && @@ -536,4 +537,26 @@ test_expect_success 'am empty-file does not infloop' ' test_i18ncmp expected actual ' +test_expect_success 'am --message-id really adds the message id' ' + rm -fr .git/rebase-apply && + git reset --hard && + git checkout HEAD^ && + git am --message-id patch1.eml && + test_path_is_missing .git/rebase-apply && + git cat-file commit HEAD | tail -n1 >actual && + grep Message-Id patch1.eml >expected && + test_cmp expected actual +' + +test_expect_success 'am --message-id -s signs off after the message id' ' + rm -fr .git/rebase-apply && + git reset --hard && + git checkout HEAD^ && + git am -s --message-id patch1.eml && + test_path_is_missing .git/rebase-apply && + git cat-file commit HEAD | tail -n2 | head -n1 >actual && + grep Message-Id patch1.eml >expected && + test_cmp expected actual +' + test_done |