Code

git-send-email: do not pass custom Date: header
authorEric Wong <normalperson@yhbt.net>
Mon, 23 Oct 2006 07:46:37 +0000 (00:46 -0700)
committerJunio C Hamano <junkio@cox.net>
Mon, 23 Oct 2006 08:12:04 +0000 (01:12 -0700)
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>
Signed-off-by: Junio C Hamano <junkio@cox.net>
git-send-email.perl

index 1c6d2cc7872ab82020d9dc32ce0086b1d3139e22..c42dc3bc943edb2e8f5d9e11a309f6e6d86848ab 100755 (executable)
@@ -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, $_;
                                }