Re: [PATCH v4 7/9] Abort if the system time cannot handle one of our timestamps
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Apr 25, 2017, 03:56 UTC
- Message-ID
- <xmqqvaptw36d.fsf@gitster.mtv.corp.google.com>
- In-Reply-To
- <alpine.DEB.2.20.1704241228510.3480@virtualbox>
Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:
> The code would also be incorrect, as the `minutes` variable can be > negative, which the `unsigned_add_overflows()` macro cannot handle (it > would report very, very false positives, and it would hurt you more than > me because I live East of Greenwich).
Yes and no. If we were to care about integer wraparound to do this check, we'd still have to worry about negative offset applied to a time very close to the epoch that turns into a timestamp far far in the future (unsigned_sub_underflows, that is).