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

Re: [REGRESSION] uninitialized value $address in git send-email

From
Bagas Sanjaya <bagasdotme@gmail.com>
Date
Sep 19, 2023, 04:44 UTC
Message-ID
<ZQknHjKdGZV3vJpV@debian.me>
In-Reply-To
<8fcd6d2a-2c16-adf9-da1f-6b9d6fdcc87a@amd.com>
On Mon, Sep 18, 2023 at 04:26:44PM -0400, Michael Strawbridge wrote:
Show 43 quoted lines
> Hi,
> 
> Author of a8022c5f7b67 (send-email: expose header information to
> git-send-email's sendemail-validate hook, 2023-04-19) here.
> 
> On 2023-09-18 08:56, Bagas Sanjaya wrote:
> > I triggered this issue on patch series with cover letter. To reproduce:
> >
> > 1. Clone git.git repo, then branch off:
> >
> >    ```
> >    $ git clone https://github.com/git/git.git && cd git
> >    $ git checkout -b test
> >    ```
> >
> > 2. Make two dummy signed-off commits:
> >
> >    ```
> >    $ echo test > test && git add test && git commit -s -m "test"
> >    $ echo "test test" >> test && git commit -a -s -m "test test"
> >    ```
> >
> > 3. Generate patch series:
> >
> >    ```
> >    $ mkdir /tmp/test
> >    $ git format-patch -o /tmp/test --cover-letter main
> >    ```
> >
> > 4. Send the series to dummy address:
> >
> >    ```
> >    $ git send-email --to="pi <pi@pi>" /tmp/test/*.patch
> >    ```
> 
> I tried to repro this today on my side.  I can repro the error when
> using the address "pi <pi@pi>" but that's not a valid email address and
> so one would expect it to fail in the extract_valid_address_or_die
> function with the error that you mention.  As soon as I make the address
> valid like "pi <pi@pi.com>", git send-email no longer complains.
> 
> In your original case, are you trying to send email to an invalid email
> address?  Is it an alias by chance?

I triggered this regression when I passed multiple addresses separated by comma (like `--to="foo <foo@acme.com>,bar <bar@acme.com>"`, but somehow I managed to reduce the trigger to one address only (in this case, "pi <pi@pi.com>"). As for multiple addresses part, let me know if I should post another regression report.

-- 
An old man doll... just what I always wanted! - Clara
Previous: Michael StrawbridgeNext: Michael Strawbridge
Message 6 of 15 in “[REGRESSION] uninitialized value $address in git send-email”
  1. Bagas SanjayaSep 18, 2023
  2. git-send-email.perl: avoid printing undef when validating addressesTaylor Blau, Sep 18, 2023
  3. Junio C HamanoSep 18, 2023
  4. Jeff KingSep 18, 2023
  5. Michael StrawbridgeSep 18, 2023
  6. Bagas SanjayaSep 19, 2023
  7. Michael StrawbridgeSep 19, 2023
  8. Michael StrawbridgeSep 19, 2023
  9. Bagas SanjayaSep 20, 2023
  10. Michael StrawbridgeSep 20, 2023
  11. Junio C HamanoSep 20, 2023
  12. Bagas SanjayaSep 21, 2023
  13. Junio C HamanoSep 21, 2023
  14. Bagas SanjayaSep 22, 2023
  15. Junio C HamanoSep 20, 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.