From: Junio C Hamano Date: Thu, 25 Apr 2019 07:41:25 +0000 (+0900) Subject: Merge branch 'bs/sendemail-tighten-anything-by' X-Git-Tag: v2.22.0-rc0~37 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/061ed420ec2dc97e2a922a6f02992869089cefb3?ds=inline;hp=-c Merge branch 'bs/sendemail-tighten-anything-by' The recently added feature to add addresses that are on anything-by: trailers in 'git send-email' was found to be way too eager and considered nonsense strings as if they can be legitimate beginning of *-by: trailer. This has been tightened. * bs/sendemail-tighten-anything-by: send-email: don't cc *-by lines with '-' prefix --- 061ed420ec2dc97e2a922a6f02992869089cefb3 diff --combined git-send-email.perl index 751cabf479,62c8f91d26..24859a7bc3 --- a/git-send-email.perl +++ b/git-send-email.perl @@@ -1699,7 -1699,7 +1699,7 @@@ sub process_file # Now parse the message body while(<$fh>) { $message .= $_; - if (/^([a-z-]*-by|Cc): (.*)/i) { + if (/^([a-z][a-z-]*-by|Cc): (.*)/i) { chomp; my ($what, $c) = ($1, $2); # strip garbage for the address we'll use: @@@ -1872,7 -1872,7 +1872,7 @@@ sub apply_transfer_encoding $message = MIME::Base64::decode($message) if ($from eq 'base64'); - $to = ($message =~ /.{999,}/) ? 'quoted-printable' : '8bit' + $to = ($message =~ /(?:.{999,}|\r)/) ? 'quoted-printable' : '8bit' if $to eq 'auto'; die __("cannot send message as 7bit")