git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Felipe Balbi <balbi@ti.com>
To: Krzysztof Mazur <krzysiek@podlesie.net>
Cc: 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 09:54:16 +0200	[thread overview]
Message-ID: <20121120075416.GA27690@arwen.pp.htv.fi> (raw)
In-Reply-To: <20121119225838.GA23412@shrek.podlesie.net>

[-- Attachment #1: Type: text/plain, Size: 1837 bytes --]

On Mon, Nov 19, 2012 at 11:58:38PM +0100, Krzysztof Mazur wrote:
> On Mon, Nov 19, 2012 at 11:27:45AM -0800, Junio C Hamano wrote:
> > Given that the problematic line
> > 
> > 	Stable Kernel Maintainance Track <stable@vger.kernel.org> # vX.Y
> > 
> > is not even a valid e-mail address, doesn't this new logic belong to
> > sanitize_address() conceptually?
> 
> Yes, it's much better to do it in the sanitize_address().
> 
> Felipe, may you check it?
> 
> Krzysiek
> -- >8 --
> Subject: [PATCH] git-send-email: remove garbage after email address
> 
> In some cases it's very useful to add some additional information
> after email in Cc-list, for instance:
> 
> "Cc: Stable kernel <stable@vger.kernel.org> #v3.4 v3.5 v3.6"
> 
> Currently the git refuses to add such invalid email to Cc-list,
> when the Email::Valid perl module is available or just uses whole line
> as the email address.
> 
> Now in sanitize_address() everything after the email address is
> removed, so the resulting line is correct email address and Email::Valid
> validates it correctly.
> 
> Signed-off-by: Krzysztof Mazur <krzysiek@podlesie.net>

Tested-by: Felipe Balbi <balbi@ti.com>

> ---
>  git-send-email.perl | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/git-send-email.perl b/git-send-email.perl
> index 5a7c29d..9840d0a 100755
> --- a/git-send-email.perl
> +++ b/git-send-email.perl
> @@ -924,6 +924,10 @@ sub quote_subject {
>  # use the simplest quoting being able to handle the recipient
>  sub sanitize_address {
>  	my ($recipient) = @_;
> +
> +	# remove garbage after email address
> +	$recipient =~ s/(.*>).*$/$1/;
> +
>  	my ($recipient_name, $recipient_addr) = ($recipient =~ /^(.*?)\s*(<.*)/);
>  
>  	if (not $recipient_name) {
> -- 
> 1.8.0.283.gc57d856
> 

-- 
balbi

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

      parent reply	other threads:[~2012-11-20  8:01 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
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 [this message]

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=20121120075416.GA27690@arwen.pp.htv.fi \
    --to=balbi@ti.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 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).