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

Re: format-patch: "magic" mbox timestamp

From
Junio C Hamano <gitster@pobox.com>
Date
Nov 10, 2020, 23:22 UTC
Message-ID
<xmqqimac6bld.fsf@gitster.c.googlers.com>
In-Reply-To
<nycvar.QRO.7.76.6.2011102347320.18437@tvgsbejvaqbjf.bet>
Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:
> The original magic timestamp, however, was the one I reintroduced, and as
> you can see from the part I quoted above, I only imitated the original
> script.

That's almost a lifetime ago that I totally forgot that it was original a shell script.

It indeed does this:

+ case "$mbox" in + t) + echo 'From nobody Mon Sep 17 00:00:00 2001' ;# UNIX "From" line + mailScript="$mailScript"' + s|^|Subject: [PATCH'"$num"'] |' + ;;

which clearly shows that "nobody" was chosen to mimic a real mailbox (i.e. unlike what Brandon said in the other message, the <mailbox> may not have "@" <domain> after <local-part>).

In any case, I think what's more important is after 15 years, if any implementation of the /etc/magic database actually take advantage of that magic date as the "magic" signal to identify a format-patch output. Despite the wishes of original authors and designers of Git and its format-patch output, perhaps no /etc/magic author noticed it, in which case it is safe to use other randomly picked dates, or the timestamp of underlying commits. Otherwise, changing the "magic" timestamp would introduce a needless regression.

Previous: Johannes SchindelinNext: Junio C Hamano
Message 3 of 4 in “format-patch: "magic" mbox timestamp”
  1. Brandon RichardsonNov 10, 2020
  2. Johannes SchindelinNov 10, 2020
  3. Junio C HamanoNov 10, 2020
  4. Junio C HamanoNov 10, 2020

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.