git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] git-send-email: do not pass custom Date: header
@ 2006-10-23  7:46 Eric Wong
  2006-10-23  8:41 ` Jakub Narebski
  0 siblings, 1 reply; 4+ messages in thread
From: Eric Wong @ 2006-10-23  7:46 UTC (permalink / raw)
  To: git, Junio C Hamano; +Cc: Eric Wong

We already generate a Date: header based on when the patch was
emailed.  git-format-patch includes the Date: header of the
patch.  Having two Date: headers is just confusing, so we
just use the current Date:

Often the mailed patches in a patch series are created over a
series of several hours or days, so the Date: header from the
original commit is incorrect for email, and often far off enough
for spam filters to complain.

Signed-off-by: Eric Wong <normalperson@yhbt.net>
---
 git-send-email.perl |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/git-send-email.perl b/git-send-email.perl
index 1c6d2cc..c42dc3b 100755
--- a/git-send-email.perl
+++ b/git-send-email.perl
@@ -514,7 +514,7 @@ foreach my $t (@files) {
 						$2, $_) unless $quiet;
 					push @cc, $2;
 				}
-				elsif (/^[-A-Za-z]+:\s+\S/) {
+				elsif (!/^Date:\s/ && /^[-A-Za-z]+:\s+\S/) {
 					push @xh, $_;
 				}
 
-- 
1.4.3.1.g3e3bc

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] git-send-email: do not pass custom Date: header
  2006-10-23  7:46 [PATCH] git-send-email: do not pass custom Date: header Eric Wong
@ 2006-10-23  8:41 ` Jakub Narebski
  2006-10-23  9:38   ` Eric Wong
  0 siblings, 1 reply; 4+ messages in thread
From: Jakub Narebski @ 2006-10-23  8:41 UTC (permalink / raw)
  To: git

Eric Wong wrote:

> We already generate a Date: header based on when the patch was
> emailed.  git-format-patch includes the Date: header of the
> patch.  Having two Date: headers is just confusing, so we
> just use the current Date:
> 
> Often the mailed patches in a patch series are created over a
> series of several hours or days, so the Date: header from the
> original commit is incorrect for email, and often far off enough
> for spam filters to complain.

But that makes us lose original commit date. And git format-patch
is if I remember correctly together with git-am used in git-rebase.
-- 
Jakub Narebski
Warsaw, Poland
ShadeHawk on #git

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] git-send-email: do not pass custom Date: header
  2006-10-23  8:41 ` Jakub Narebski
@ 2006-10-23  9:38   ` Eric Wong
  2006-10-24  6:46     ` Junio C Hamano
  0 siblings, 1 reply; 4+ messages in thread
From: Eric Wong @ 2006-10-23  9:38 UTC (permalink / raw)
  To: Jakub Narebski; +Cc: git

Jakub Narebski <jnareb@gmail.com> wrote:
> Eric Wong wrote:
> 
> > We already generate a Date: header based on when the patch was
> > emailed. ?git-format-patch includes the Date: header of the
> > patch. ?Having two Date: headers is just confusing, so we
> > just use the current Date:
> > 
> > Often the mailed patches in a patch series are created over a
> > series of several hours or days, so the Date: header from the
> > original commit is incorrect for email, and often far off enough
> > for spam filters to complain.
> 
> But that makes us lose original commit date. And git format-patch
> is if I remember correctly together with git-am used in git-rebase.

This patch is for git-send-email, and only affects the way they
are sent over SMTP.  Output of git-format-patch is unchanged.

-- 
Eric Wong

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] git-send-email: do not pass custom Date: header
  2006-10-23  9:38   ` Eric Wong
@ 2006-10-24  6:46     ` Junio C Hamano
  0 siblings, 0 replies; 4+ messages in thread
From: Junio C Hamano @ 2006-10-24  6:46 UTC (permalink / raw)
  To: Eric Wong; +Cc: git

Eric Wong <normalperson@yhbt.net> writes:

> Jakub Narebski <jnareb@gmail.com> wrote:
>> Eric Wong wrote:
>> 
>> > We already generate a Date: header based on when the patch was
>> > emailed. ?git-format-patch includes the Date: header of the
>> > patch. ?Having two Date: headers is just confusing, so we
>> > just use the current Date:
>> > 
>> > Often the mailed patches in a patch series are created over a
>> > series of several hours or days, so the Date: header from the
>> > original commit is incorrect for email, and often far off enough
>> > for spam filters to complain.
>> 
>> But that makes us lose original commit date. And git format-patch
>> is if I remember correctly together with git-am used in git-rebase.
>
> This patch is for git-send-email, and only affects the way they
> are sent over SMTP.  Output of git-format-patch is unchanged.

An alternative to satisfy both (Jakub wants original author date
propagated to the recipient of the e-mail who will run "git-am"
to apply the patch; you do not want to throw potentially ancient
author date as the e-mail's Date: to SMTP layer) is to use
sending date in e-mail header (like your patch does) _and_ leave
the Date: header for the original author date as the first line
of the e-mail message, separated with the real body of the message
with a blank line.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2006-10-24  6:46 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-10-23  7:46 [PATCH] git-send-email: do not pass custom Date: header Eric Wong
2006-10-23  8:41 ` Jakub Narebski
2006-10-23  9:38   ` Eric Wong
2006-10-24  6:46     ` Junio C Hamano

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 NNTP newsgroup(s).