make git-send-email.perl handle email addresses with no names when Email::Valid is present
When using git-send-email.perl on a changeset that has: Cc: <stable@kernel.org> in the body of the description, and the Email::Valid perl module is installed on the system, the email address will be deemed "invalid" for some reason (Email::Valid isn't smart enough to handle this?) and complain and not send the address the email. Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Greg KH committed
Jul 12, 2007 at 21:17 UTC
b06c6bc831cbb9e9eb82fd3ffd5a2b674cd940d0
1 file changed
+1
git-send-email.perl
+1
@@ -410,6 +410,7 @@ sub extract_valid_address {
410
return $address if ($address =~ /^($local_part_regexp)$/);
411
412
if ($have_email_valid) {
413
+ $address =~ s/^<(.*)>$/$1/;
414
return scalar Email::Valid->address($address);
415
} else {
416
# less robust/correct than the monster regexp in Email::Valid,