t4150: am.messageid really adds the message id
Since a078f73 (git-am: add --message-id/--no-message-id, 2014-11-25), the am.messageid setting determines whether the --message-id option is set by default. Add a test for this. Signed-off-by: Paul Tan <pyokagan@gmail.com> Reviewed-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Paul Tan committed
Jul 7, 2015 at 22:08 UTC
8528bf4b89650dc7312ae48f32dac3f1c7ab9a65
1 file changed
+12
t/t4150-am.sh
+12
@@ -563,6 +563,18 @@ test_expect_success 'am --message-id really adds the message id' '
563
test_cmp expected actual
564
'
565
566
+test_expect_success 'am.messageid really adds the message id' '
567
+ rm -fr .git/rebase-apply &&
568
+ git reset --hard &&
569
+ git checkout HEAD^ &&
570
+ test_config am.messageid true &&
571
+ git am patch1.eml &&
572
+ test_path_is_missing .git/rebase-apply &&
573
+ git cat-file commit HEAD | tail -n1 >actual &&
574
+ grep Message-Id patch1.eml >expected &&
575
+ test_cmp expected actual
576
+'
577
+
578
test_expect_success 'am --message-id -s signs off after the message id' '
579
rm -fr .git/rebase-apply &&
580
git reset --hard &&