Skip to content

Commit

Permalink
make git-send-email.perl handle email addresses with no names when Em…
Browse files Browse the repository at this point in the history
…ail::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>
  • Loading branch information
Greg KH authored and Junio C Hamano committed Jul 13, 2007
1 parent af83bed commit b06c6bc
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions git-send-email.perl
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit b06c6bc

Please sign in to comment.