Re: Invalid dates in git log

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxx>
> 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
-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux