Merge branch 'jh/send-email-one-cc' into maint
"Cc:" on the trailer part does not have to conform to RFC strictly, unlike in the e-mail header. "git send-email" has been updated to ignore anything after '>' when picking addresses, to allow non-address cruft like " # stable 4.4" after the address. * jh/send-email-one-cc: send-email: only allow one address per body tag
This commit is contained in:
@ -1563,7 +1563,7 @@ foreach my $t (@files) {
|
|||||||
# Now parse the message body
|
# Now parse the message body
|
||||||
while(<$fh>) {
|
while(<$fh>) {
|
||||||
$message .= $_;
|
$message .= $_;
|
||||||
if (/^(Signed-off-by|Cc): (.*)$/i) {
|
if (/^(Signed-off-by|Cc): ([^>]*>?)/i) {
|
||||||
chomp;
|
chomp;
|
||||||
my ($what, $c) = ($1, $2);
|
my ($what, $c) = ($1, $2);
|
||||||
chomp $c;
|
chomp $c;
|
||||||
|
@ -148,7 +148,6 @@ cat >expected-cc <<\EOF
|
|||||||
!two@example.com!
|
!two@example.com!
|
||||||
!three@example.com!
|
!three@example.com!
|
||||||
!four@example.com!
|
!four@example.com!
|
||||||
!five@example.com!
|
|
||||||
EOF
|
EOF
|
||||||
"
|
"
|
||||||
|
|
||||||
@ -159,9 +158,9 @@ test_expect_success $PREREQ 'cc trailer with various syntax' '
|
|||||||
Test Cc: trailers.
|
Test Cc: trailers.
|
||||||
|
|
||||||
Cc: one@example.com
|
Cc: one@example.com
|
||||||
Cc: <two@example.com> # this is part of the name
|
Cc: <two@example.com> # trailing comments are ignored
|
||||||
Cc: <three@example.com>, <four@example.com> # not.five@example.com
|
Cc: <three@example.com>, <not.four@example.com> one address per line
|
||||||
Cc: "Some # Body" <five@example.com> [part.of.name.too]
|
Cc: "Some # Body" <four@example.com> [ <also.a.comment> ]
|
||||||
EOF
|
EOF
|
||||||
clean_fake_sendmail &&
|
clean_fake_sendmail &&
|
||||||
git send-email -1 --to=recipient@example.com \
|
git send-email -1 --to=recipient@example.com \
|
||||||
|
Reference in New Issue
Block a user