git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH] git-send-email: do not pass custom Date: header

From
EWEric Wong <normalperson@yhbt.net>
Date
Oct 23, 2006, 07:46 UTC
Message-ID
<11615895973387-git-send-email-normalperson@yhbt.net>

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
Next: Jakub Narebski
Message 1 of 4 in “git-send-email: do not pass custom Date: header”
  1. git-send-email: do not pass custom Date: headerEric Wong, Oct 23, 2006
  2. Jakub NarebskiOct 23, 2006
  3. Eric WongOct 23, 2006
  4. Junio C HamanoOct 24, 2006

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.