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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, 12 Jul 2007 23:34:14 -0700 Greg KH <greg@xxxxxxxxx> wrote:
>
> On Thu, Jul 12, 2007 at 10:47:17PM -0700, Junio C Hamano wrote:
> > Greg KH <greg@xxxxxxxxx> writes:
> > 
> > > When using git-send-email.perl on a changeset that has:
> > > 	Cc: <stable@xxxxxxxxxx>
> > > 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@xxxxxxx>
> >         ok  foo@xxxxxxx
> >         ok  Foo <foo@xxxxxxx>

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@xxxxxxxxxxxxxxxx
http://www.canb.auug.org.au/~sfr/

Attachment: pgpI3BRjwhNBB.pgp
Description: PGP signature


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux