From: Bagas Sanjaya <bagasdotme@gmail.com>
To: "Michael Strawbridge" <michael.strawbridge@amd.com>,
"Junio C Hamano" <gitster@pobox.com>,
"Luben Tuikov" <luben.tuikov@amd.com>,
"Ævar Arnfjörð Bjarmason" <avarab@gmail.com>,
"Emily Shaffer" <nasamuffin@google.com>,
"Doug Anderson" <dianders@chromium.org>
Cc: Git Mailing List <git@vger.kernel.org>
Subject: [REGRESSION] uninitialized value $address in git send-email
Date: Mon, 18 Sep 2023 19:56:05 +0700 [thread overview]
Message-ID: <ZQhI5fMhDE82awpE@debian.me> (raw)
[-- Attachment #1: Type: text/plain, Size: 2037 bytes --]
Hi,
Recently when I was submitting doc fixes to linux-doc mailing list [1]
using git-send-email(1), I got perl-related error:
```
Use of uninitialized value $address in sprintf at /home/bagas/.app/git/dist/v2.42.0/libexec/git-core/git-send-email line 1172.
error: unable to extract a valid address from:
```
My linux.git clone has sendemail-validate hook which uses patatt (from b4
package). The hook is:
```
#!/bin/sh
# installed by patatt install-hook
patatt sign --hook "${1}"
```
This issue occurs on Git v2.41.0 but not in v2.40.0. Bisecting, the culprit is
commit a8022c5f7b67 (send-email: expose header information to git-send-email's
sendemail-validate hook, 2023-04-19). Emily's earlier report [2] also points to
the same culprit, but with different bug.
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
```
git-send-email(1) trips on the cover letter since there is no recipient
addresses detected. It also errored out on patches without Signed-off-by
trailer. When the command should have been succeeded, I expected that it
asked me whether to send each patch or not.
My system runs Debian testing (trixie/sid) with perl 5.36.0.
Thanks.
[1]: https://lore.kernel.org/linux-doc/20230918093240.29824-1-bagasdotme@gmail.com/
[2]: https://lore.kernel.org/git/CAJoAoZ=GGgjGOeaeo6RFBO7=6msdRf-Ze6XcnL04K5ugupLUJA@mail.gmail.com/
--
An old man doll... just what I always wanted! - Clara
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]
next reply other threads:[~2023-09-18 12:57 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-09-18 12:56 Bagas Sanjaya [this message]
2023-09-18 16:35 ` [PATCH] git-send-email.perl: avoid printing undef when validating addresses Taylor Blau
2023-09-18 19:04 ` Junio C Hamano
2023-09-18 21:20 ` Jeff King
2023-09-18 20:26 ` [REGRESSION] uninitialized value $address in git send-email Michael Strawbridge
2023-09-19 4:44 ` Bagas Sanjaya
2023-09-19 14:04 ` Michael Strawbridge
2023-09-19 14:37 ` Michael Strawbridge
2023-09-20 11:00 ` Bagas Sanjaya
2023-09-20 13:14 ` Michael Strawbridge
2023-09-20 15:43 ` Junio C Hamano
2023-09-21 7:51 ` Bagas Sanjaya
2023-09-21 20:42 ` Junio C Hamano
2023-09-22 7:39 ` Bagas Sanjaya
2023-09-20 15:36 ` Junio C Hamano
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: http://vger.kernel.org/majordomo-info.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ZQhI5fMhDE82awpE@debian.me \
--to=bagasdotme@gmail.com \
--cc=avarab@gmail.com \
--cc=dianders@chromium.org \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=luben.tuikov@amd.com \
--cc=michael.strawbridge@amd.com \
--cc=nasamuffin@google.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).