From: "Strawbridge, Michael" <Michael.Strawbridge@amd.com>
To: "email@example.com" <firstname.lastname@example.org>
Cc: "Strawbridge, Michael" <Michael.Strawbridge@amd.com>
Subject: [PATCH 0/2] Expose header information to git-send-email's sendemail-validate hook
Date: Fri, 11 Nov 2022 02:13:47 +0000 [thread overview]
Message-ID: <email@example.com> (raw)
Sure. Thank you for the quick feedback. Let me see if I can explain the idea.
Sometimes it can be helpful to react to special keywords in a git send-email subject line or specific email address. Like perhaps one wants to do some kind of sorting of patches by mailing list or "to" email address. You could use the sendemail-validate hook as a way to copy the patch to a specific location locally based on who you are emailing. I'm sure there could be other uses for the smtp header information as well. Presumably the header information is printed to stdout before sending an email, for other reasons too (this happens already). My patch makes it possible to now automate any checks one might be doing manually with these headers.
With some testing I can confirm that encoded headers (like a utf8 string) get passed in encoded form. The random example I tried was with the subject "Rhyddhewch y racŵn" and it is showns as "Subject: [PATCH] =?UTF-8?q?Rhyddhewch=20y=20rac=C5=B5n?=". However, the original print of the smtp headers doesn't handle encoded text either, so it is no worse than current.
Lastly, with the validate code moving later there are some changes in output. After my change, the user will get asked about: composed email (compose argument code), 8 bit encoding, who to send to, and which message-ID to reply to before validation. Since these change the header information, validation needs to happen after.
PS- I fixed the Signed-off-by as well.
Michael Strawbridge (2):
Expose header information to git-send-email's sendemail-validate hook
Update sendemail-validate hook docs to add header file parameter
Documentation/githooks.txt | 8 +++---
git-send-email.perl | 57 +++++++++++++++++++++++++-------------
2 files changed, 41 insertions(+), 24 deletions(-)
next reply other threads:[~2022-11-11 2:13 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-11 2:13 Strawbridge, Michael [this message]
2022-11-11 2:15 [PATCH 0/2] Expose header information to git-send-email's sendemail-validate hook Strawbridge, Michael
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:
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 \
* 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
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).