aboutsummaryrefslogtreecommitdiff
path: root/t/t4150-am.sh
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2014-11-25 15:00:56 +0100
committerJunio C Hamano <gitster@pobox.com>2014-11-25 15:27:01 -0800
commita078f7321b02eb945b63804a80b0ba52c9da4ed3 (patch)
tree85c9fd21df647a326c93d847f69c6475b48ffe91 /t/t4150-am.sh
parent452dfbed1a80754bfdc52567d9d9dba08a7d0a6d (diff)
downloadgit-a078f7321b02eb945b63804a80b0ba52c9da4ed3.tar.gz
git-a078f7321b02eb945b63804a80b0ba52c9da4ed3.tar.xz
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-xt/t4150-am.sh23
1 files changed, 23 insertions, 0 deletions
diff --git a/t/t4150-am.sh b/t/t4150-am.sh
index 5edb79a05..306e6f39a 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