Re: unable to pull from remote if commit date is in the future

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

 



On Mon, Jun 20, 2016 at 03:39:28PM -0400, Jeff King wrote:

> On Mon, Jun 20, 2016 at 12:05:07PM -0700, Norbert Kiesel wrote:
> 
> > Hmm.  On closer inspection that commit 23c07cc that github shows with
> > date 2152-06-19 is already in my local branch.  I got confused because
> > locally it is shown with a different date: `git log -1 --format='%ci'
> > 23c07cc` shows "2106-02-07 06:28:56 -40643156" which is invalid.
> > 
> > My system is running Debian unstable 64bit.  Is git using the time
> > rendering methods from the C library (glibc 2.22-12)?
> 
> No, git's time code is (mostly) internal routines. Can you show us the
> output of:
> 
>     git cat-file commit 23c07cc | egrep '^author|committer'
> 
> Note also that some interfaces (like "git log", and GitHub) will show
> the author date by default, which might be different than the committer
> date. The "-40643156" timezone definitely looks suspicious, though. I'm
> curious if it is bad handling in the time code, or if the commit has
> corrupt ident lines.

Actually, I just noticed in your earlier message a link to the public
GitHub repository.

So to answer my own questions:

  $ git cat-file commit 23c07cc | egrep '^author|committer'
  author Sean D'Epagnier <seandepagnier@xxxxxxxxx> 5758122296 -40643156
  committer Sean D'Epagnier <seandepagnier@xxxxxxxxx> 5758122296 -40643156

Yes, the timezone really is that ridiculous value. No, the author and
committer aren't different. According to GNU date, the correct timestamp
is actually in 2152. Offhand, I'd guess that the timestamp exceeding
2^32 is getting converted somewhere inside git to a bogus value, and
that's how we end up with 2106.

-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]