Re: Back-dating commits--way back--for constitution.git

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

 



On Tue, Aug 03, 2010 at 12:02:52PM +0200, Jakub Narebski wrote:

> > Hmm, sizeof(time_t) == 8 for my x86_64 Fedora, but committing ancient
> > times fails.
> 
> That's because git *porcelain* either does not use time_t consistently,
> or has some sanity checks that are good heuristic for ordinary use (like
> e.g. commit time not too far in past where git didn't even exists),
> or both.
> 
> It is not a problem on lowest level, i.e. repository format and plumbing.
> I was able to create a commit that had author time before Unix epoch 
> using plumbing:

I am not sure there isn't some unportability at the lowest level. We
freely interchange between time_t and unsigned long in the low-level
date code. It probably happens to work because casting the bits back and
forth between signed and unsigned types generally works, as long as you
end up with the type that you want. But it isn't necessarily portable,
and there can be subtle bugs. See, for example, my recent 9ba0f033.

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