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

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

From
SRStephen Rothwell <sfr@canb.auug.org.au>
Date
Jul 13, 2007, 08:28 UTC
Message-ID
<20070713182818.fd37372f.sfr@canb.auug.org.au>
In-Reply-To
<20070713063414.GN24317@kroah.com>
On Thu, 12 Jul 2007 23:34:14 -0700 Greg KH <greg@kroah.com> wrote:
Show 17 quoted lines
>
> On Thu, Jul 12, 2007 at 10:47:17PM -0700, Junio C Hamano wrote:
> > Greg KH <greg@kroah.com> writes:
> > 
> > > 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.
> > 
> > That appears to be the case.
> > 
> >         bad foo
> >         bad <foo@bar.baz>
> >         ok  foo@bar.baz
> >         ok  Foo <foo@bar.baz>

This would be a bug in Email::Valid as it complains that the second address fails the rfc822 check, however rfc822 says that the "display name" before the '<' is optional.

> > I'd probably do:
> > 
> > 	if ($have_email_valid) {
> > 		$address =~ s/^<(.*)>$/$1/;
	$address =~ s/^\s*<(.*)>\s*$/$1/;
-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/
Previous: Greg KHNext: Greg KH
Message 4 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.