git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
* [PATCH] send-email: try to order messages in email clients more correctly
@ 2006-03-25 11:01 Eric Wong
  0 siblings, 0 replies; only message in thread
From: Eric Wong @ 2006-03-25 11:01 UTC (permalink / raw
  To: Junio C Hamano; +Cc: git, Greg KH, Ryan Anderson, Eric Wong

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 <normalperson@yhbt.net>

---

 git-send-email.perl |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

695849a185ee8cfc8f3df0c737ff16a04cc84a5b
diff --git a/git-send-email.perl b/git-send-email.perl
index 207b1fb..de635ed 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);
@@ -295,13 +295,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
-- 
1.2.4.gb622a

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2006-03-25 11:01 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-03-25 11:01 [PATCH] send-email: try to order messages in email clients more correctly Eric Wong

Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).