Andrew's git
/
gitweb.git
/ diff
summary
|
log
|
commit
| diff |
tree
commit
grep
author
committer
pickaxe
?
re
git-send-email: real name with period need to be dq-quoted on From: line
author
Junio C Hamano
<junkio@cox.net>
Fri, 6 Oct 2006 06:40:15 +0000
(23:40 -0700)
committer
Junio C Hamano
<junkio@cox.net>
Fri, 6 Oct 2006 06:40:15 +0000
(23:40 -0700)
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>
git-send-email.perl
patch
|
blob
|
history
raw
|
patch
| inline |
side by side
(parent:
ce91c2f
)
diff --git
a/git-send-email.perl
b/git-send-email.perl
index 2fd5e87934edba0c17d657fe0878c8a380202328..21b3686b2c94740fac030624dc2eefeda82617da 100755
(executable)
--- a/
git-send-email.perl
+++ b/
git-send-email.perl
@@
-409,6
+409,11
@@
sub send_message
$gitversion = Git::version();
}
+ my ($author_name) = ($from =~ /^(.*?)\s+</);
+ if ($author_name =~ /\./ && $author_name !~ /^".*"$/) {
+ my ($name, $addr) = ($from =~ /^(.*?)(\s+<.*)/);
+ $from = "\"$name\"$addr";
+ }
my $header = "From: $from
To: $to
Cc: $cc