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 -0400So 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.