From: Michael Hendricks <michael@ndrix.org>
To: git@vger.kernel.org
Cc: Michael Hendricks <michael@ndrix.org>
Subject: [PATCH] git-send-email: RFC2822 compliant Message-ID
Date: Wed, 20 Jun 2007 07:25:01 -0600 [thread overview]
Message-ID: <11823459011323-git-send-email-michael@ndrix.org> (raw)
In-Reply-To: 20070620.034202.35337858.davem@davemloft.net
RFC 2822 section 3.6.4 suggests that a "good method" for generating a
Message-ID is to put the domain name of the host on the right-side of
the "@" character. Use Perl's Sys::Hostname to do the heavy lifting.
This module has been in the Perl core since version 5.
---
git-send-email.perl | 7 ++++---
1 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/git-send-email.perl b/git-send-email.perl
index 7c0c90b..2259f4b 100755
--- a/git-send-email.perl
+++ b/git-send-email.perl
@@ -21,6 +21,7 @@ use warnings;
use Term::ReadLine;
use Getopt::Long;
use Data::Dumper;
+use Sys::Hostname;
use Git;
package FakeTerm;
@@ -411,9 +412,9 @@ sub extract_valid_address {
# a random number to the end, in case we are called quicker than
# 1 second since the last time we were called.
-# We'll setup a template for the message id, using the "from" address:
-my $message_id_from = extract_valid_address($from);
-my $message_id_template = "<%s-git-send-email-$message_id_from>";
+# We'll setup a template for the message id, using the hostname:
+my $hostname = hostname();
+my $message_id_template = "<%s-git-send-email\@$hostname>";
sub make_message_id
{
--
1.5.2.2.238.g7cbf2f2
next reply other threads:[~2007-06-20 13:25 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-06-20 13:25 Michael Hendricks [this message]
2007-06-20 20:18 ` [PATCH] git-send-email: RFC2822 compliant Message-ID Junio C Hamano
2007-06-20 20:47 ` Junio C Hamano
2007-06-21 4:09 ` Michael Hendricks
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=11823459011323-git-send-email-michael@ndrix.org \
--to=michael@ndrix.org \
--cc=git@vger.kernel.org \
/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.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.