{"thread":{"id":"3721","subject":"[PATCH] send-email: try to order messages in email clients more correctly","startedAt":"2006-03-25T11:01:01Z","lastAt":"2006-03-25T11:01:01Z","messageCount":1,"participants":["Eric Wong"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"17931","messageId":"11432844613551-git-send-email-normalperson@yhbt.net","threadId":"3721","inReplyTo":null,"subject":"[PATCH] send-email: try to order messages in email clients more correctly","fromName":"Eric Wong","fromEmail":"normalperson@yhbt.net","sentAt":"2006-03-25T11:01:01Z","receivedAt":"2006-03-25T11:01:01Z","isPatch":true,"sender":{"key":"e@80x24.org","avatar":null},"body":"If --no-chain-reply-to is set, patches may not always be ordered\ncorrectly in email clients.  This patch makes sure each email\nsent from a different second.\n\nI chose to start with a time (slightly) in the past because\nthose are probably more likely in real-world usage and spam\nfilters might be more tolerant of them.\n\nSigned-off-by: Eric Wong <normalperson@yhbt.net>\n\n---\n\n git-send-email.perl |    5 +++--\n 1 files changed, 3 insertions(+), 2 deletions(-)\n\n695849a185ee8cfc8f3df0c737ff16a04cc84a5b\ndiff --git a/git-send-email.perl b/git-send-email.perl\nindex 207b1fb..de635ed 100755\n--- a/git-send-email.perl\n+++ b/git-send-email.perl\n@@ -37,7 +37,7 @@ sub cleanup_compose_files();\n my $compose_filename = \".msg.$$\";\n \n # Variables we fill in automatically, or via prompting:\n-my (@to,@cc,@initial_cc,$initial_reply_to,$initial_subject,@files,$from,$compose);\n+my (@to,@cc,@initial_cc,$initial_reply_to,$initial_subject,@files,$from,$compose,$time);\n \n # Behavior modification variables\n my ($chain_reply_to, $smtp_server, $quiet, $suppress_from, $no_signed_off_cc) = (1, \"localhost\", 0, 0, 0);\n@@ -295,13 +295,14 @@ sub make_message_id\n \n \n $cc = \"\";\n+$time = time - scalar $#files;\n \n sub send_message\n {\n \tmy @recipients = unique_email_list(@to);\n \tmy $to = join (\",\\n\\t\", @recipients);\n \t@recipients = unique_email_list(@recipients,@cc);\n-\tmy $date = strftime('%a, %d %b %Y %H:%M:%S %z', localtime(time));\n+\tmy $date = strftime('%a, %d %b %Y %H:%M:%S %z', localtime($time++));\n \n \tmy $header = \"From: $from\n To: $to\n-- \n1.2.4.gb622a\n"}]}