git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: Failure to extra stable@vger.kernel.org addresses

From
Junio C Hamano <gitster@pobox.com>
Date
Nov 19, 2012, 19:27 UTC
Message-ID
<7vk3thxuj2.fsf@alter.siamese.dyndns.org>
In-Reply-To
<20121119151845.GA29678@shrek.podlesie.net>
Krzysztof Mazur <krzysiek@podlesie.net> writes:
Show 37 quoted lines
> 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?

Previous: Felipe BalbiNext: Felipe Contreras
Message 4 of 34 in “Failure to extra stable@vger.kernel.org addresses”
  1. Felipe BalbiNov 19, 2012
  2. Krzysztof MazurNov 19, 2012
  3. Felipe BalbiNov 19, 2012
  4. Junio C HamanoNov 19, 2012
  5. Felipe ContrerasNov 19, 2012
  6. Krzysztof MazurNov 19, 2012
  7. Felipe ContrerasNov 19, 2012
  8. Junio C HamanoNov 19, 2012
  9. Krzysztof MazurNov 20, 2012
  10. Krzysztof MazurNov 20, 2012
  11. Felipe ContrerasNov 20, 2012
  12. Andreas EricssonNov 20, 2012
  13. Krzysztof MazurNov 20, 2012
  14. Andreas SchwabNov 20, 2012
  15. Krzysztof MazurNov 20, 2012
  16. Felipe ContrerasNov 20, 2012
  17. Junio C HamanoNov 20, 2012
  18. Krzysztof MazurNov 20, 2012
  19. Junio C HamanoNov 20, 2012
  20. 1/5 git-send-email: remove garbage after email addressKrzysztof Mazur, Nov 22, 2012
  21. 2/5 git-send-email: fix fallback code in extract_valid_address()Krzysztof Mazur, Nov 22, 2012
  22. 3/5 git-send-email: remove invalid addresses earlierKrzysztof Mazur, Nov 22, 2012
  23. Junio C HamanoNov 26, 2012
  24. 4/5 git-send-email: ask what to do with an invalid email addressKrzysztof Mazur, Nov 22, 2012
  25. 5/5 git-send-email: allow edit invalid email addressKrzysztof Mazur, Nov 22, 2012
  26. Junio C HamanoNov 26, 2012
  27. Krzysztof MazurNov 26, 2012
  28. Junio C HamanoNov 26, 2012
  29. Krzysztof MazurNov 26, 2012
  30. Junio C HamanoNov 26, 2012
  31. Krzysztof MazurNov 27, 2012
  32. Junio C HamanoNov 20, 2012
  33. Krzysztof MazurNov 20, 2012
  34. Felipe BalbiNov 20, 2012

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.