提交 b06c6bc8 编写于 作者: G Greg KH 提交者: Junio C Hamano

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: NGreg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: NJunio C Hamano <gitster@pobox.com>
上级 af83bed6
......@@ -410,6 +410,7 @@ sub extract_valid_address {
return $address if ($address =~ /^($local_part_regexp)$/);
if ($have_email_valid) {
$address =~ s/^<(.*)>$/$1/;
return scalar Email::Valid->address($address);
} else {
# less robust/correct than the monster regexp in Email::Valid,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册