From: Junio C Hamano Date: Tue, 20 Nov 2012 22:30:02 GMT Subject: Re: Failure to extra stable@vger.kernel.org addresses Message-ID: <7vhaojrjpx.fsf@alter.siamese.dyndns.org> In-Reply-To: Felipe Contreras writes: > On Tue, Nov 20, 2012 at 10:21 PM, Krzysztof Mazur wrote: > >> --- 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/; > > That won't work for 'foo@bar.com # test'. I think we should abandon > hopes of properly parsing an email address and just do: > > $recipient =~ s/(.*?) #.*$/$1/; We should probably fix the tools that generate these bogus non-addresses first. What's wrong with Cc: stable kernel (v3.5 v3.6 v3.7) which should be OK? Also I suspect that this should be also deemed valid: Cc: stable@vger.kernel.org (Stable kernel - v3.5 v3.6 v3.7)