Re: [ANNOUNCE] Git v2.9.1
- From
Jeff King <peff@peff.net>
- Date
- Jul 12, 2016, 16:09 UTC
- Message-ID
- <20160712160921.GA2965@sigill.intra.peff.net>
- In-Reply-To
- <xmqqlh167tjd.fsf@gitster.mtv.corp.google.com>
On Tue, Jul 12, 2016 at 08:41:42AM -0700, Junio C Hamano wrote:
Show 8 quoted lines
> Jeff King <peff@peff.net> writes: > > > I am not certain that there is a modern system with 32-bit time_t. We > > know there are systems with 32-bit unsigned long, and I think that is > > what produced the results people saw. I'd expect even 32-bit systems to > > use "int64_t" or similar for their time_t these days. > > OK.
In case it wasn't clear, I was mostly guessing there. So I dug a bit further, and indeed, I am wrong. Linux never bumped to a 64-bit time_t on i386 because of the ABI headaches.
That being said, I still think the "clamp to time_t" strategy is reasonable. Unless you are doing something really exotic like pretending to be from the future, nobody will care for 20 years. And at that point, systems with a 32-bit time_t are going to have to do _something_, because time() is going to start returning bogus values. So as long as we behave reasonably (e.g., clamping values and not generating wrapped nonsense), I think that's a fine solution.
-Peff