Skip to content

Commit 1d6a003

Browse files
Eric WongJunio C Hamano
authored andcommitted
git-send-email: do not pass custom Date: header
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>
1 parent 178e015 commit 1d6a003

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

git-send-email.perl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -514,7 +514,7 @@ sub send_message
514514
$2, $_) unless $quiet;
515515
push @cc, $2;
516516
}
517-
elsif (/^[-A-Za-z]+:\s+\S/) {
517+
elsif (!/^Date:\s/ && /^[-A-Za-z]+:\s+\S/) {
518518
push @xh, $_;
519519
}
520520

0 commit comments

Comments
 (0)