diff options
author | Paolo Bonzini <pbonzini@redhat.com> | 2014-11-25 15:00:56 +0100 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2014-11-26 00:27:01 +0100 |
commit | a078f7321b02eb945b63804a80b0ba52c9da4ed3 (patch) | |
tree | 85c9fd21df647a326c93d847f69c6475b48ffe91 /t/t4150-am.sh | |
parent | git-mailinfo: add --message-id (diff) | |
download | git-a078f7321b02eb945b63804a80b0ba52c9da4ed3.tar.xz git-a078f7321b02eb945b63804a80b0ba52c9da4ed3.zip |
git-am: add --message-id/--no-message-id
Parse the option and pass it directly to git-mailinfo.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
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 |