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

Re: git-format-patch Date header

From
Linus Torvalds <torvalds@osdl.org>
Date
Jan 9, 2006, 06:11 UTC
Message-ID
<Pine.LNX.4.64.0601082207510.3169@g5.osdl.org>
In-Reply-To
<43C12DE9.8010906@op5.se>
On Sun, 8 Jan 2006, Andreas Ericsson wrote:
> 
> Actually, that's what's printed in the commit message, so any change 
> would have to be put there and that would break backwards compatibility 
> for new tools that might want to use it.

No, git should always take the date in any of a million different formats, and always turn it into "seconds + timezone" internally.

The fact that git-format-patch also prints it out in the internal format is unambiguous (nice) but human-unreadable (bad).

There are other unambiguous formats it could use, notably standard rfc2822 format ("date -R").

The git "show_date()" function hopefully does exactly that rfc2822 format, but you'd have to make a helper program to do the conversion in git-format-patch.sh.

		Linus
Previous: Andreas Ericsson
Message 8 of 8 in “.gitignore git-describe”
  1. .gitignore git-describeAndreas Ericsson, Jan 8, 2006
  2. git-format-patch Date headerTimo Hirvonen, Jan 8, 2006
  3. Andreas EricssonJan 8, 2006
  4. Timo HirvonenJan 8, 2006
  5. Andreas EricssonJan 8, 2006
  6. H. Peter AnvinJan 8, 2006
  7. Andreas EricssonJan 8, 2006
  8. Linus TorvaldsJan 9, 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.