From: Junio C Hamano Date: Thu, 25 Apr 2019 07:41:25 +0000 (+0900) Subject: Merge branch 'bc/send-email-qp-cr' X-Git-Tag: v2.22.0-rc0~38 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/5983ddc165221c3ec2a4299b65cfb2ecc1ce7765?ds=inline;hp=-c Merge branch 'bc/send-email-qp-cr' "git send-email" has been taught to use quoted-printable when the payload contains carriage-return. The use of the mechanism is in line with the design originally added the codepath that chooses QP when the payload has overly long lines. * bc/send-email-qp-cr: send-email: default to quoted-printable when CR is present --- 5983ddc165221c3ec2a4299b65cfb2ecc1ce7765 diff --combined git-send-email.perl index 8200d58cdc,3f66e1cdc2..751cabf479 --- a/git-send-email.perl +++ b/git-send-email.perl @@@ -465,8 -465,6 +465,8 @@@ $smtp_encryption = '' unless (defined $ my(%suppress_cc); if (@suppress_cc) { foreach my $entry (@suppress_cc) { + # Please update $__git_send_email_suppresscc_options + # in git-completion.bash when you add new options. die sprintf(__("Unknown --suppress-cc field: '%s'\n"), $entry) unless $entry =~ /^(?:all|cccmd|cc|author|self|sob|body|bodycc|misc-by)$/; $suppress_cc{$entry} = 1; @@@ -496,8 -494,6 +496,8 @@@ my $confirm_unconfigured = !defined $co if ($confirm_unconfigured) { $confirm = scalar %suppress_cc ? 'compose' : 'auto'; }; +# Please update $__git_send_email_confirm_options in +# git-completion.bash when you add new options. die sprintf(__("Unknown --confirm setting: '%s'\n"), $confirm) unless $confirm =~ /^(?:auto|cc|compose|always|never)/; @@@ -591,8 -587,6 +591,8 @@@ my %parse_alias = if (/\(define-mail-alias\s+"(\S+?)"\s+"(\S+?)"\)/) { $aliases{$1} = [ $2 ]; }}} + # Please update _git_config() in git-completion.bash when you + # add new MUAs. ); if (@alias_files and $aliasfiletype and defined $parse_alias{$aliasfiletype}) { @@@ -1872,7 -1866,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")