git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] make git-send-email.perl handle email addresses with no names when Email::Valid is present
@ 2007-07-13  4:17 Greg KH
  2007-07-13  5:47 ` Junio C Hamano
  2007-08-09 12:28 ` Uwe Kleine-König
  0 siblings, 2 replies; 7+ messages in thread
From: Greg KH @ 2007-07-13  4:17 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: git

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.

Anyway, this tiny patch fixes this problem for me.  Note, my perl-foo is
quite week, so this could probably be easily done in one line for those
with better reg-ex skills.


Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

--- a/git-send-email.perl
+++ b/git-send-email.perl
@@ -410,6 +410,9 @@ sub extract_valid_address {
 	return $address if ($address =~ /^($local_part_regexp)$/);
 
 	if ($have_email_valid) {
+		if ($address =~ s/^<//) {
+			$address =~ s/>$//;
+		}
 		return scalar Email::Valid->address($address);
 	} else {
 		# less robust/correct than the monster regexp in Email::Valid,

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2007-08-09 12:29 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-07-13  4:17 [PATCH] make git-send-email.perl handle email addresses with no names when Email::Valid is present Greg KH
2007-07-13  5:47 ` Junio C Hamano
2007-07-13  6:34   ` Greg KH
2007-07-13  8:28     ` Stephen Rothwell
2007-07-14  4:00       ` Greg KH
2007-07-14 10:38         ` Stephen Rothwell
2007-08-09 12:28 ` Uwe Kleine-König

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).