From: Andreas Schwab <schwab@linux-m68k.org>
To: Krzysztof Mazur <krzysiek@podlesie.net>
Cc: Felipe Contreras <felipe.contreras@gmail.com>,
Junio C Hamano <gitster@pobox.com>, Felipe Balbi <balbi@ti.com>,
git@vger.kernel.org, Tomi Valkeinen <tomi.valkeinen@ti.com>
Subject: Re: Failure to extra stable@vger.kernel.org addresses
Date: Tue, 20 Nov 2012 20:58:20 +0100 [thread overview]
Message-ID: <m2lidw11yb.fsf@igel.home> (raw)
In-Reply-To: <20121120115942.GA6132@shrek.podlesie.net> (Krzysztof Mazur's message of "Tue, 20 Nov 2012 12:59:42 +0100")
Krzysztof Mazur <krzysiek@podlesie.net> writes:
> On Tue, Nov 20, 2012 at 11:28:39AM +0100, Felipe Contreras wrote:
>> On Tue, Nov 20, 2012 at 8:56 AM, Krzysztof Mazur <krzysiek@podlesie.net> wrote:
>>
>> > --- a/git-send-email.perl
>> > +++ b/git-send-email.perl
>> > @@ -925,8 +925,11 @@ sub quote_subject {
>> > sub sanitize_address {
>> > my ($recipient) = @_;
>> >
>> > + my $local_part_regexp = qr/[^<>"\s@]+/;
>> > + my $domain_regexp = qr/[^.<>"\s@]+(?:\.[^.<>"\s@]+)+/;
>> > +
>> > # remove garbage after email address
>> > - $recipient =~ s/(.*>).*$/$1/;
>> > + $recipient =~ s/^(.*?<$local_part_regexp\@$domain_regexp>).*/$1/;
>>
>> I don't think all that extra complexity is warranted, to me
>> s/(.*?>)(.*)$/$1/ is just fine.
>>
>
> Yeah, it's a little bit too complex, but "s/(.*?>)(.*)$/$1/"
How about "s/(.*?<[^>]*>).*$/$1/"? That will still fail on "<foo@bar>"
<foo@bar>, but you'll need a full rfc822 parser to handle the general
case anyway.
Andreas.
--
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."
next prev parent reply other threads:[~2012-11-20 19:58 UTC|newest]
Thread overview: 34+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-11-19 9:57 Failure to extra stable@vger.kernel.org addresses Felipe Balbi
2012-11-19 15:18 ` Krzysztof Mazur
2012-11-19 15:37 ` Felipe Balbi
2012-11-19 19:27 ` Junio C Hamano
2012-11-19 21:59 ` Felipe Contreras
2012-11-19 22:58 ` Krzysztof Mazur
2012-11-19 23:12 ` Felipe Contreras
2012-11-19 23:57 ` Junio C Hamano
2012-11-20 7:31 ` Krzysztof Mazur
2012-11-20 7:56 ` Krzysztof Mazur
2012-11-20 10:28 ` Felipe Contreras
2012-11-20 11:08 ` Andreas Ericsson
2012-11-20 11:59 ` Krzysztof Mazur
2012-11-20 19:58 ` Andreas Schwab [this message]
2012-11-20 21:21 ` Krzysztof Mazur
2012-11-20 22:06 ` Felipe Contreras
2012-11-20 22:30 ` Junio C Hamano
2012-11-20 23:09 ` Krzysztof Mazur
2012-11-20 23:43 ` Junio C Hamano
2012-11-22 18:12 ` [PATCH 1/5] git-send-email: remove garbage after email address Krzysztof Mazur
2012-11-22 18:12 ` [PATCH 2/5] git-send-email: fix fallback code in extract_valid_address() Krzysztof Mazur
2012-11-22 18:12 ` [PATCH 3/5] git-send-email: remove invalid addresses earlier Krzysztof Mazur
2012-11-26 17:02 ` Junio C Hamano
2012-11-22 18:12 ` [PATCH 4/5] git-send-email: ask what to do with an invalid email address Krzysztof Mazur
2012-11-22 18:12 ` [PATCH 5/5] git-send-email: allow edit " Krzysztof Mazur
2012-11-26 17:08 ` Junio C Hamano
2012-11-26 17:33 ` Krzysztof Mazur
2012-11-26 22:58 ` Junio C Hamano
2012-11-26 23:33 ` Krzysztof Mazur
2012-11-26 23:50 ` Junio C Hamano
2012-11-27 10:53 ` Krzysztof Mazur
2012-11-20 0:00 ` Failure to extra stable@vger.kernel.org addresses Junio C Hamano
2012-11-20 7:15 ` Krzysztof Mazur
2012-11-20 7:54 ` Felipe Balbi
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=m2lidw11yb.fsf@igel.home \
--to=schwab@linux-m68k.org \
--cc=balbi@ti.com \
--cc=felipe.contreras@gmail.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=krzysiek@podlesie.net \
--cc=tomi.valkeinen@ti.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.