git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
* [PATCH 0/2] Expose header information to git-send-email's sendemail-validate hook
@ 2022-11-11  2:15 Strawbridge, Michael
  2022-11-11  2:15 ` [PATCH 1/2] " Strawbridge, Michael
  2022-11-11  2:15 ` [PATCH 2/2] Update sendemail-validate hook docs to add header file parameter Strawbridge, Michael
  0 siblings, 2 replies; 5+ messages in thread
From: Strawbridge, Michael @ 2022-11-11  2:15 UTC (permalink / raw)
  To: git@vger.kernel.org
  Cc: Strawbridge, Michael, Tuikov, Luben, brian m . carlson

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.

Michael
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(-)

Cc: Luben Tuikov <luben.tuikov@amd.com>
Cc: brian m. carlson <sandals@crustytoothpaste.net>

-- 
2.34.1

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2022-11-11 19:12 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-11-11  2:15 [PATCH 0/2] Expose header information to git-send-email's sendemail-validate hook Strawbridge, Michael
2022-11-11  2:15 ` [PATCH 1/2] " Strawbridge, Michael
2022-11-11  2:15 ` [PATCH 2/2] Update sendemail-validate hook docs to add header file parameter Strawbridge, Michael
2022-11-11 15:10   ` Ævar Arnfjörð Bjarmason
2022-11-11 19:12   ` Luben Tuikov

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).