git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH] make git-send-email.perl handle email addresses with no names when Email::Valid is present

From
Greg KH <greg@kroah.com>
Date
Jul 13, 2007, 04:17 UTC
Message-ID
<20070713041749.GA28824@kroah.com>
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,
Next: Junio C Hamano
Message 1 of 7 in “make git-send-email.perl handle email addresses with no names when Email::Valid is present”
  1. make git-send-email.perl handle email addresses with no names when Email::Valid is presentGreg KH, Jul 13, 2007
  2. Junio C HamanoJul 13, 2007
  3. Greg KHJul 13, 2007
  4. Stephen RothwellJul 13, 2007
  5. Greg KHJul 14, 2007
  6. Stephen RothwellJul 14, 2007
  7. Uwe Kleine-KönigAug 9, 2007

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.