From: Uwe Kleine-König Date: Thu, 9 Aug 2007 13:27:57 +0000 (+0200) Subject: send-email: rfc822 forbids using without a non-empty "phrase" X-Git-Tag: v1.5.3-rc5~47 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=155197e6e770599a5ed7a33a33f2916032184dd3;p=git.git send-email: rfc822 forbids using without a non-empty "phrase" Email::Valid does respect this considering such a mailbox specification invalid. b06c6bc831cbb9e9eb82fd3ffd5a2b674cd940d0 addressed the issue, but only if Email::Valid is available. Signed-off-by: Uwe Kleine-König Signed-off-by: Junio C Hamano --- diff --git a/git-send-email.perl b/git-send-email.perl index 39e433b76..a02ab9694 100755 --- a/git-send-email.perl +++ b/git-send-email.perl @@ -408,8 +408,8 @@ sub extract_valid_address { # check for a local address: return $address if ($address =~ /^($local_part_regexp)$/); + $address =~ s/^\s*<(.*)>\s*$/$1/; if ($have_email_valid) { - $address =~ s/^\s*<(.*)>\s*$/$1/; return scalar Email::Valid->address($address); } else { # less robust/correct than the monster regexp in Email::Valid,