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

Re: Regression: git send-email fails with "Use of uninitialized value $address" + "unable to extract a valid address"

From
Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Date
Oct 25, 2023, 07:40 UTC
Message-ID
<20231025074023.dowdv67urpjtzzka@pengutronix.de>
In-Reply-To
<20231025072104.GA2145145@coredump.intra.peff.net>
Hello,
On Wed, Oct 25, 2023 at 03:21:04AM -0400, Jeff King wrote:
Show 27 quoted lines
> On Tue, Oct 24, 2023 at 10:43:18PM +0200, Uwe Kleine-König wrote:
> 
> > I debugged a bit and if I do
> > 
> > 	mv .git/hooks/sendemail-validate .git/hooks/sendemail-validate.bak
> > 
> > git send-email --to 'Uwe Kleine-König <u.kleine-koenig@pengutronix.de>'
> > starts to work for me, too.
> > 
> > I'd guess the content of my sendemail-validate script doesn't matter
> > much, but for the record, it's:
> > 
> > 	#!/bin/sh
> > 	# installed by patatt install-hook
> > 	patatt sign --hook "${1}"
> > 
> > Does the problem reproduce on your end with a sendemail-validate script?
> 
> I can reproduce with:
> 
>   git init
>   echo foo >file && git add file && git commit -m foo
>   echo 'exit 0' >.git/hooks/sendemail-validate
>   chmod +x .git/hooks/sendemail-validate
>   git send-email --dry-run --to='pëff <peff@peff.net>' -1
> 
> Note that the bug will only trigger if Email::Valid is installed.

I can confirm I have this package installed (via Debian's libemail-valid-perl).

Show 9 quoted lines
> I think this is the same issue being discussed elsewhere. The call to
> process_address_list() sanitizes it to use rfc2047 encoding, which is
> necessary for it to be syntactically valid.
> 
> So the patch to move the validation later in the process here:
> 
>   https://lore.kernel.org/git/ee56c4df-e030-45f9-86a9-94fb3540db60@amd.com/
> 
> fixes it.

Tested and indeed that fixes my usecase. With that patch also the original regression is fixed and I can do

	git send-email -1 --to 'Uwe Kleine-König <u.kleine-koenig@pengutronix.de>, pëff <peff@peff.net>'
again. \o/

Thanks Uwe

-- 
Pengutronix e.K.                           | Uwe Kleine-König            |
Industrial Linux Solutions                 | https://www.pengutronix.de/ |
Previous: Jeff KingNext: Junio C Hamano
Message 9 of 14 in “Regression: git send-email fails with "Use of uninitialized value $address" + "unable to extract a valid address"”
  1. Uwe Kleine-KönigOct 13, 2023
  2. Kristoffer HaugsbakkOct 13, 2023
  3. Uwe Kleine-KönigOct 20, 2023
  4. Michael StrawbridgeOct 20, 2023
  5. Uwe Kleine-KönigOct 24, 2023
  6. Michael StrawbridgeOct 24, 2023
  7. Uwe Kleine-KönigOct 24, 2023
  8. Jeff KingOct 25, 2023
  9. Uwe Kleine-KönigOct 25, 2023
  10. Junio C HamanoOct 26, 2023
  11. Michael StrawbridgeOct 26, 2023
  12. Todd ZullingerOct 26, 2023
  13. Junio C HamanoOct 27, 2023
  14. Jeff KingOct 30, 2023

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.