From: Eric Wong Date: Sat, 25 Mar 2006 11:01:01 +0000 (-0800) Subject: send-email: try to order messages in email clients more correctly X-Git-Tag: v1.3.0-rc1~6^2~1 X-Git-Url: https://git.octo.it/?p=git.git;a=commitdiff_plain;h=a5370b16c34993c1d0f65171d5704244901e005b send-email: try to order messages in email clients more correctly If --no-chain-reply-to is set, patches may not always be ordered correctly in email clients. This patch makes sure each email sent from a different second. I chose to start with a time (slightly) in the past because those are probably more likely in real-world usage and spam filters might be more tolerant of them. Signed-off-by: Eric Wong Signed-off-by: Junio C Hamano --- diff --git a/git-send-email.perl b/git-send-email.perl index e578aff7..d2af98ac 100755 --- a/git-send-email.perl +++ b/git-send-email.perl @@ -37,7 +37,7 @@ sub cleanup_compose_files(); my $compose_filename = ".msg.$$"; # Variables we fill in automatically, or via prompting: -my (@to,@cc,@initial_cc,$initial_reply_to,$initial_subject,@files,$from,$compose); +my (@to,@cc,@initial_cc,$initial_reply_to,$initial_subject,@files,$from,$compose,$time); # Behavior modification variables my ($chain_reply_to, $smtp_server, $quiet, $suppress_from, $no_signed_off_cc) = (1, "localhost", 0, 0, 0); @@ -273,13 +273,14 @@ sub make_message_id $cc = ""; +$time = time - scalar $#files; sub send_message { my @recipients = unique_email_list(@to); my $to = join (",\n\t", @recipients); @recipients = unique_email_list(@recipients,@cc); - my $date = strftime('%a, %d %b %Y %H:%M:%S %z', localtime(time)); + my $date = strftime('%a, %d %b %Y %H:%M:%S %z', localtime($time++)); my $header = "From: $from To: $to