diff options
author | Junio C Hamano <gitster@pobox.com> | 2016-04-22 15:45:05 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2016-04-22 15:45:05 -0700 |
commit | 18dff3dde5c7f05b87d54047569eb4a7f369367a (patch) | |
tree | 93b628134f4e721ff7d4070f5668140572a86958 /git-send-email.perl | |
parent | deef3cdc08eb16354d16da0813585d60d5f34412 (diff) | |
parent | f916ab0ccc1fbeee5a63ec29246ba99df7ff256f (diff) | |
download | git-18dff3dde5c7f05b87d54047569eb4a7f369367a.tar.gz |
Merge branch 'ew/send-email-readable-message-id'
"git send-email" now uses a more readable timestamps when
formulating a message ID.
* ew/send-email-readable-message-id:
send-email: more meaningful Message-ID
Diffstat (limited to 'git-send-email.perl')
-rwxr-xr-x | git-send-email.perl | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/git-send-email.perl b/git-send-email.perl index c45b22a19a..bc74ec979e 100755 --- a/git-send-email.perl +++ b/git-send-email.perl @@ -19,6 +19,7 @@ use 5.008; use strict; use warnings; +use POSIX qw/strftime/; use Term::ReadLine; use Getopt::Long; use Text::ParseWords; @@ -949,7 +950,7 @@ my ($message_id_stamp, $message_id_serial); sub make_message_id { my $uniq; if (!defined $message_id_stamp) { - $message_id_stamp = sprintf("%s-%s", time, $$); + $message_id_stamp = strftime("%Y%m%d%H%M%S.$$", gmtime(time)); $message_id_serial = 0; } $message_id_serial++; @@ -964,7 +965,7 @@ sub make_message_id { require Sys::Hostname; $du_part = 'user@' . Sys::Hostname::hostname(); } - my $message_id_template = "<%s-git-send-email-%s>"; + my $message_id_template = "<%s-%s>"; $message_id = sprintf($message_id_template, $uniq, $du_part); #print "new message id = $message_id\n"; # Was useful for debugging } |