]> git.ipfire.org Git - thirdparty/git.git/commitdiff
send-email: remove cargo-culted multi-patch pattern in tests
authorÆvar Arnfjörð Bjarmason <avarab@gmail.com>
Fri, 17 May 2019 19:55:41 +0000 (21:55 +0200)
committerJunio C Hamano <gitster@pobox.com>
Sun, 19 May 2019 01:12:51 +0000 (10:12 +0900)
Change test code added in f434c083a0 ("send-email: add --no-cc,
--no-to, and --no-bcc", 2010-03-07) which blindly copied a pattern
from an earlier test added in 32ae83194b ("add a test for
git-send-email for non-threaded mails", 2009-06-12) where the
"$patches" variable was supplied more than once.

As it turns out we didn't need more than one "$patches" for the test
added in 32ae83194b either. The only tests that actually needed this
sort of invocation were the tests added in 54aae5e1a0 ("t9001:
send-email interation with --in-reply-to and --chain-reply-to",
2010-10-19).

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
t/t9001-send-email.sh

index c67be97e305a88656f1200e22b123d2836bde0ee..461bb5b3077e3b3a3807ca7d3fd8607b5a6e68c2 100755 (executable)
@@ -1176,7 +1176,7 @@ test_expect_success $PREREQ 'no in-reply-to and no threading' '
                --from="Example <nobody@example.com>" \
                --to=nobody@example.com \
                --no-thread \
-               $patches $patches >stdout &&
+               $patches >stdout &&
        ! grep "In-Reply-To: " stdout
 '
 
@@ -1196,7 +1196,7 @@ test_expect_success $PREREQ 'sendemail.to works' '
        git send-email \
                --dry-run \
                --from="Example <nobody@example.com>" \
-               $patches $patches >stdout &&
+               $patches >stdout &&
        grep "To: Somebody <somebody@ex.com>" stdout
 '
 
@@ -1206,7 +1206,7 @@ test_expect_success $PREREQ '--no-to overrides sendemail.to' '
                --from="Example <nobody@example.com>" \
                --no-to \
                --to=nobody@example.com \
-               $patches $patches >stdout &&
+               $patches >stdout &&
        grep "To: nobody@example.com" stdout &&
        ! grep "To: Somebody <somebody@ex.com>" stdout
 '
@@ -1217,7 +1217,7 @@ test_expect_success $PREREQ 'sendemail.cc works' '
                --dry-run \
                --from="Example <nobody@example.com>" \
                --to=nobody@example.com \
-               $patches $patches >stdout &&
+               $patches >stdout &&
        grep "Cc: Somebody <somebody@ex.com>" stdout
 '
 
@@ -1228,7 +1228,7 @@ test_expect_success $PREREQ '--no-cc overrides sendemail.cc' '
                --no-cc \
                --cc=bodies@example.com \
                --to=nobody@example.com \
-               $patches $patches >stdout &&
+               $patches >stdout &&
        grep "Cc: bodies@example.com" stdout &&
        ! grep "Cc: Somebody <somebody@ex.com>" stdout
 '
@@ -1240,7 +1240,7 @@ test_expect_success $PREREQ 'sendemail.bcc works' '
                --from="Example <nobody@example.com>" \
                --to=nobody@example.com \
                --smtp-server relay.example.com \
-               $patches $patches >stdout &&
+               $patches >stdout &&
        grep "RCPT TO:<other@ex.com>" stdout
 '
 
@@ -1252,7 +1252,7 @@ test_expect_success $PREREQ '--no-bcc overrides sendemail.bcc' '
                --bcc=bodies@example.com \
                --to=nobody@example.com \
                --smtp-server relay.example.com \
-               $patches $patches >stdout &&
+               $patches >stdout &&
        grep "RCPT TO:<bodies@example.com>" stdout &&
        ! grep "RCPT TO:<other@ex.com>" stdout
 '