Thread (33 messages) flat view 33 messages, 10 authors, 2016-06-15

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

From: Jeff King <hidden>
Date: 2016-06-15 22:49:14

On Tue, Aug 03, 2010 at 12:02:52PM +0200, Jakub Narebski wrote:
quoted
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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help