mirror of
https://github.com/git/git.git
synced 2024-11-29 04:54:56 +08:00
Merge branch 'ew/send-email-readable-message-id' into maint
"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
This commit is contained in:
commit
ffaa7c5d4f
@ -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
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user