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

Re: Invalid dates in git log

From
Junio C Hamano <gitster@pobox.com>
Date
Dec 12, 2007, 09:35 UTC
Message-ID
<7vejds8ddf.fsf@gitster.siamese.dyndns.org>
In-Reply-To
<20071212092304.GA20799@coredump.intra.peff.net>
Jeff King <peff@peff.net> writes:
Show 9 quoted lines
> On Wed, Dec 12, 2007 at 10:11:12AM +0100, Eirik Bjørsnøs wrote:
>
>> My questions are:
>> 
>> 1) Is this a problem in the Git software?
>
> No. Whoever made the commit probably just didn't have their clock set
> right. Git doesn't generally care about the timestamp for its
> operations; it just records it as a historical note.

"git show -s" with --pretty=fuller and --pretty=raw on these two commiits reveal:

    Author:     Ursula Braun <braunu@de.ibm.com>
    AuthorDate: Thu Jan 1 01:00:01 1970 +0100
    Commit:     Jeff Garzik <jeff@garzik.org>
    CommitDate: Fri Oct 19 23:00:02 2007 -0400
    author Ursula Braun <braunu@de.ibm.com> 1 +0100
    committer Jeff Garzik <jeff@garzik.org> 1192849202 -0400
    Author:     Len Brown <len.brown@intel.com>
    AuthorDate: Fri Apr 5 00:07:45 2019 -0500
    Commit:     Len Brown <len.brown@intel.com>
    CommitDate: Tue Jul 12 00:12:09 2005 -0400
    author Len Brown <len.brown@intel.com> 1554440865 -0500
    committer Len Brown <len.brown@intel.com> 1121141529 -0400

So the former commit was made while seting GIT_AUTHOR_DATE explicitly to 1, which is quite likely a bug in some script Jeff used to create this commit about two months ago.

I have no idea about the latter, though. It looks like quite a random timestamp, and committer timestamp look reasonable, relative to the other commits around it.

For a short while, between Nov 11th to Dec 8th this year on 'next' (and between Dec 4th and Dec 8th on 'master'), git-commit-tree accepted an empty GIT_AUTHOR_DATE and recorded a bogus "0" time in the commit by mistake, but such a commit would have shown something like:

    author A U Thor <au.thor@example.com>

without any timestamp, and both commits predate the gotcha, so I do not think they are caused by that recent breakage.

Previous: Jeff KingNext: Johannes Schindelin
Message 3 of 7 in “Invalid dates in git log”
  1. Eirik BjørsnøsDec 12, 2007
  2. Jeff KingDec 12, 2007
  3. Junio C HamanoDec 12, 2007
  4. Johannes SchindelinDec 12, 2007
  5. Junio C HamanoDec 12, 2007
  6. Eirik BjørsnøsDec 12, 2007
  7. Andreas EricssonDec 12, 2007

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.