git-send-email: real name with period need to be dq-quoted on From: line
An author name like 'A. U. Thor <a.u.thor@example.com>" is not a valid RFC 2822 address; when placing it on From: line, we would need to quote it, like this: Signed-off-by: "Junio C. Hamano" <junkio@cox.net>
Junio C Hamano committed
Oct 5, 2006 at 23:40 UTC
7a2a0d214169a5d6f22fc62c4ae6a7ca5b27fb3e
1 file changed
+5
git-send-email.perl
+5
@@ -409,6 +409,11 @@ sub send_message
409
$gitversion = Git::version();
410
}
411
412
+ my ($author_name) = ($from =~ /^(.*?)\s+</);
413
+ if ($author_name =~ /\./ && $author_name !~ /^".*"$/) {
414
+ my ($name, $addr) = ($from =~ /^(.*?)(\s+<.*)/);
415
+ $from = "\"$name\"$addr";
416
+ }
417
my $header = "From: $from
418
To: $to
419
Cc: $cc