send-email: default to quoted-printable when CR is present
[gitweb.git] / git-send-email.perl
index 8eb63b5a2f8d07038f6c8ef645a483cd77ffd99f..3f66e1cdc216dec39ff52bef2e2520ea8b2959e2 100755 (executable)
@@ -1866,7 +1866,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")