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

Re: Invalid dates in git log

From
Jeff King <peff@peff.net>
Date
Dec 12, 2007, 09:23 UTC
Message-ID
<20071212092304.GA20799@coredump.intra.peff.net>
In-Reply-To
<34660cca0712120111k3f11769fk1a8cefda3b82683e@mail.gmail.com>
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.

> 2) Or is it a data corruption issue in the repository?

No. You can check for corruption with git-fsck, but these commits were actually created with bad dates.

> 3) Can it be fixed and should I contact anyone to get it fixed?

Changing the date will change the commit id (since the id is the sha1 of the commit contents). Which would mean rewriting all of the history that follows it. You could do it in your own repository, but then you might have some trouble merging with Linus later on. Linus could do it, but I doubt he will think it is worth the trouble.

> $ git  log  a27ac38efd6dc6dccebfc9bcc475ab4aa5fc4a56 -1
> commit a27ac38efd6dc6dccebfc9bcc475ab4aa5fc4a56
> Author: Len Brown <len.brown@intel.com>
> Date:   Fri Apr 5 00:07:45 2019 -0500
Your best guess is probably the committer information. Try this:
  git log a27ac38 -1 --pretty=format:'Author: %an %ad%nCommitter: %cn %cd'
-Peff
Previous: Eirik BjørsnøsNext: Junio C Hamano
Message 2 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.