{"thread":{"id":"6008","subject":"[PATCH] git-send-email: do not pass custom Date: header","startedAt":"2006-10-23T07:46:37Z","lastAt":"2006-10-24T06:46:48Z","messageCount":4,"participants":["Eric Wong","Jakub Narebski","Junio C Hamano"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"29704","messageId":"11615895973387-git-send-email-normalperson@yhbt.net","threadId":"6008","inReplyTo":null,"subject":"[PATCH] git-send-email: do not pass custom Date: header","fromName":"Eric Wong","fromEmail":"normalperson@yhbt.net","sentAt":"2006-10-23T07:46:37Z","receivedAt":"2006-10-23T07:46:37Z","isPatch":true,"sender":{"key":"e@80x24.org","avatar":null},"body":"We already generate a Date: header based on when the patch was\nemailed.  git-format-patch includes the Date: header of the\npatch.  Having two Date: headers is just confusing, so we\njust use the current Date:\n\nOften the mailed patches in a patch series are created over a\nseries of several hours or days, so the Date: header from the\noriginal commit is incorrect for email, and often far off enough\nfor spam filters to complain.\n\nSigned-off-by: Eric Wong <normalperson@yhbt.net>\n---\n git-send-email.perl |    2 +-\n 1 files changed, 1 insertions(+), 1 deletions(-)\n\ndiff --git a/git-send-email.perl b/git-send-email.perl\nindex 1c6d2cc..c42dc3b 100755\n--- a/git-send-email.perl\n+++ b/git-send-email.perl\n@@ -514,7 +514,7 @@ foreach my $t (@files) {\n \t\t\t\t\t\t$2, $_) unless $quiet;\n \t\t\t\t\tpush @cc, $2;\n \t\t\t\t}\n-\t\t\t\telsif (/^[-A-Za-z]+:\\s+\\S/) {\n+\t\t\t\telsif (!/^Date:\\s/ && /^[-A-Za-z]+:\\s+\\S/) {\n \t\t\t\t\tpush @xh, $_;\n \t\t\t\t}\n \n-- \n1.4.3.1.g3e3bc\n"},{"id":"29705","messageId":"ehhv6g$4js$1@sea.gmane.org","threadId":"6008","inReplyTo":"11615895973387-git-send-email-normalperson@yhbt.net","subject":"Re: [PATCH] git-send-email: do not pass custom Date: header","fromName":"Jakub Narebski","fromEmail":"jnareb@gmail.com","sentAt":"2006-10-23T08:41:10Z","receivedAt":"2006-10-23T08:41:10Z","isPatch":true,"sender":{"key":"jnareb@gmail.com","avatar":"https://avatars.githubusercontent.com/u/2706?v=4"},"body":"Eric Wong wrote:\n\n> We already generate a Date: header based on when the patch was\n> emailed.  git-format-patch includes the Date: header of the\n> patch.  Having two Date: headers is just confusing, so we\n> just use the current Date:\n> \n> Often the mailed patches in a patch series are created over a\n> series of several hours or days, so the Date: header from the\n> original commit is incorrect for email, and often far off enough\n> for spam filters to complain.\n\nBut that makes us lose original commit date. And git format-patch\nis if I remember correctly together with git-am used in git-rebase.\n-- \nJakub Narebski\nWarsaw, Poland\nShadeHawk on #git\n"},{"id":"29706","messageId":"20061023093824.GB8749@localdomain","threadId":"6008","inReplyTo":"ehhv6g$4js$1@sea.gmane.org","subject":"Re: [PATCH] git-send-email: do not pass custom Date: header","fromName":"Eric Wong","fromEmail":"normalperson@yhbt.net","sentAt":"2006-10-23T09:38:24Z","receivedAt":"2006-10-23T09:38:24Z","isPatch":true,"sender":{"key":"e@80x24.org","avatar":null},"body":"Jakub Narebski <jnareb@gmail.com> wrote:\n> Eric Wong wrote:\n> \n> > We already generate a Date: header based on when the patch was\n> > emailed. ?git-format-patch includes the Date: header of the\n> > patch. ?Having two Date: headers is just confusing, so we\n> > just use the current Date:\n> > \n> > Often the mailed patches in a patch series are created over a\n> > series of several hours or days, so the Date: header from the\n> > original commit is incorrect for email, and often far off enough\n> > for spam filters to complain.\n> \n> But that makes us lose original commit date. And git format-patch\n> is if I remember correctly together with git-am used in git-rebase.\n\nThis patch is for git-send-email, and only affects the way they\nare sent over SMTP.  Output of git-format-patch is unchanged.\n\n-- \nEric Wong\n"},{"id":"29819","messageId":"7vr6wyqkh3.fsf@assigned-by-dhcp.cox.net","threadId":"6008","inReplyTo":"20061023093824.GB8749@localdomain","subject":"Re: [PATCH] git-send-email: do not pass custom Date: header","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2006-10-24T06:46:48Z","receivedAt":"2006-10-24T06:46:48Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Eric Wong <normalperson@yhbt.net> writes:\n\n> Jakub Narebski <jnareb@gmail.com> wrote:\n>> Eric Wong wrote:\n>> \n>> > We already generate a Date: header based on when the patch was\n>> > emailed. ?git-format-patch includes the Date: header of the\n>> > patch. ?Having two Date: headers is just confusing, so we\n>> > just use the current Date:\n>> > \n>> > Often the mailed patches in a patch series are created over a\n>> > series of several hours or days, so the Date: header from the\n>> > original commit is incorrect for email, and often far off enough\n>> > for spam filters to complain.\n>> \n>> But that makes us lose original commit date. And git format-patch\n>> is if I remember correctly together with git-am used in git-rebase.\n>\n> This patch is for git-send-email, and only affects the way they\n> are sent over SMTP.  Output of git-format-patch is unchanged.\n\nAn alternative to satisfy both (Jakub wants original author date\npropagated to the recipient of the e-mail who will run \"git-am\"\nto apply the patch; you do not want to throw potentially ancient\nauthor date as the e-mail's Date: to SMTP layer) is to use\nsending date in e-mail header (like your patch does) _and_ leave\nthe Date: header for the original author date as the first line\nof the e-mail message, separated with the real body of the message\nwith a blank line.\n"}]}