Re: Failure to extra stable@vger.kernel.org addresses
- From
Felipe Contreras <felipe.contreras@gmail.com>
- Date
- Nov 19, 2012, 21:59 UTC
- Message-ID
- <CAMP44s3SeGgyAq_5G=t3iR8LB0Yo7drh7Hc4poo6eEbsS-i_yA@mail.gmail.com>
- In-Reply-To
- <7vk3thxuj2.fsf@alter.siamese.dyndns.org>
On Mon, Nov 19, 2012 at 8:27 PM, Junio C Hamano <gitster@pobox.com> wrote:
Show 46 quoted lines
> Krzysztof Mazur <krzysiek@podlesie.net> writes:
>
>> On Mon, Nov 19, 2012 at 11:57:47AM +0200, Felipe Balbi wrote:
>>> Hi guys,
>>>
>>> for whatever reason my git has started acting up with
>>> stable@vger.kernel.org addresses. It doesn't manage to extract a valid
>>> adress from the string:
>>>
>>> Cc: <stable@vger.kernel.org> # v3.4 v3.5 v3.6
>>>
>>> Removing the comment at the end of the line makes things work again. I
>>> do remember, however, seeing this working since few weeks back I sent a
>>> mail to stable (in fact the same one I'm using to test), so this could
>>> be related to some perl updates, who knows ?!?
>>
>> You probably just installed Email::Valid package.
>>
>> The current git-send-email works a little better and just prints an error:
>>
>> W: unable to extract a valid address from: <stable@vger.kernel.org> #v3.4 v3.5 v3.6
>>
>>
>> This patch should fix the problem, now after <email> any garbage is
>> removed while extracting address.
>>
>> diff --git a/git-send-email.perl b/git-send-email.perl
>> index 5a7c29d..bb659da 100755
>> --- a/git-send-email.perl
>> +++ b/git-send-email.perl
>> @@ -828,7 +828,7 @@ sub extract_valid_address {
>> # check for a local address:
>> return $address if ($address =~ /^($local_part_regexp)$/);
>>
>> - $address =~ s/^\s*<(.*)>\s*$/$1/;
>> + $address =~ s/^\s*<(.*)>.*$/$1/;
>> if ($have_email_valid) {
>> return scalar Email::Valid->address($address);
>> } else {
>
> 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?That would be great, it would also help the cc-cmd stuff. The get_maintainer.pl patch from the Linux kernel outputs something like:
David Airlie <airlied@linux.ie> (maintainer:DRM DRIVERS) Ben Skeggs <bskeggs@redhat.com> (commit_signer:17/19=89%,commit_signer:43/46=93%) Maxim Levitsky <maximlevitsky@gmail.com> (commit_signer:3/19=16%) Greg Kroah-Hartman <gregkh@linuxfoundation.org> (commit_signer:2/19=11%) Dave Airlie <airlied@redhat.com> (commit_signer:2/19=11%,commit_signer:3/46=7%) Alex Deucher <alexander.deucher@amd.com> (commit_signer:1/19=5%) dri-devel@lists.freedesktop.org (open list:DRM DRIVERS) linux-kernel@vger.kernel.org (open list)
-- Felipe Contreras