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

Re: git send-email sets date

From
Junio C Hamano <gitster@pobox.com>
Date
Jan 30, 2018, 20:37 UTC
Message-ID
<xmqqo9lbt75o.fsf@gitster-ct.c.googlers.com>
In-Reply-To
<20180126183230.0ae0c76b@kitsune.suse.cz>
Michal Suchánek <msuchanek@suse.de> writes:
Show 9 quoted lines
> git send-email sets the message date to author date.
>
> This is wrong because the message will most likely not get delivered
> when the author date differs from current time. It might give slightly
> better results with commit date instead of author date but can't is
> just skip that header and leave it to the mailer?
>
> It does not even seem to have an option to suppress adding the date
> header.

I think you are complaining about output from "git format-patch", and the reason why the date header is recorded in the output is as others already mentioned in this thread.

The complaint about "delivery" is misplaced because that date is not used to drive the SMTP conversation in any way. "git send-email" does create its own timestamp, but that is based on the current time and does not have anything to do with the author or committer date of the original commit the patch message came from.

I think we confused end-users like you by allowing the command to drive "git format-patch" from the command line (and worse, somehow appearing to encourage such use), which probably was a UI mistake. We should encourage people to run two commands separately instead, which incidentally will allow the patch messages to be proofread for the last time before they are sent out, but also reduce this confusion when users see that these dates from the author timestamp are not used in the "Date:" header of received e-mails.

Previous: Eric Wong
Message 8 of 8 in “git send-email sets date”
  1. Michal SuchánekJan 26, 2018
  2. brian m. carlsonJan 28, 2018
  3. Philip OakleyJan 28, 2018
  4. Theodore Ts'oJan 28, 2018
  5. Junio C HamanoJan 30, 2018
  6. Ævar Arnfjörð BjarmasonJan 28, 2018
  7. Eric WongJan 29, 2018
  8. Junio C HamanoJan 30, 2018

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.