mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Brandon Richardson <>
To: Git Mailing List <>
Cc: Junio C Hamano <>,
Subject: format-patch: "magic" mbox timestamp
Date: Tue, 10 Nov 2020 17:54:47 -0400	[thread overview]
Message-ID: <> (raw)

Hi all,

After submitting a patch internally within our organization today, I
was looking through the `format-patch` output and was curious to see
the strange timestamp on the "From" line. At first glance I thought
the parent commit timestamp might have been off, but that wasn't the
case. I thought it might be a bug but quickly noticed the fixed
timestamp string in `log-tree`.

Reading through the various revisions of `log-tree.c` didn't answer
many questions either, until I turned to the docs and read:

> The patch produced by git format-patch is in UNIX mailbox format, with a fixed "magic" time stamp to indicate that the file is output from format-patch rather than a real mailbox [...]

I find this pretty interesting, and would like to hear more from those
that introduced change. It looks like this was first introduced in
3eefc18917 (Tentative built-in format-patch., 2006-04-18), albeit with
a different "magic" timestamp, and then changed to its current
timestamp value in 698ce6f87e (fmt-patch: Support --attach,

Please correct me if I'm wrong, but I'm assuming the "UNIX mailbox
format" referenced in the docs refers to the mbox database format
described in appendix A of RFC-4155. If so, since we use a commit id
in place of the sender email address, would that itself be sufficient
to indicate that the output isn't from a real mailbox? A commit id
will never match the addr-spec in RFC-2822, so I figure that anyone
looking at `format-patch` output could safely assume that it did not
originate from a mailbox.

I could see this as a good opportunity to use a more relevant
timestamp, perhaps the commit timestamp of the first patch in the

             reply	other threads:[~2020-11-10 21:55 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-10 21:54 Brandon Richardson [this message]
2020-11-10 23:12 ` format-patch: "magic" mbox timestamp Johannes Schindelin
2020-11-10 23:22   ` Junio C Hamano
2020-11-10 23:13 ` Junio C Hamano

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:

  List information:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='' \ \ \ \ \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

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 read-only IMAP folder(s) and NNTP newsgroup(s).