diff options
author | Johannes Schindelin <johannes.schindelin@gmx.de> | 2017-04-26 21:29:42 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2017-04-27 13:07:40 +0900 |
commit | 28f4aee3fb1a45ebcda8ff84f94d6d2d0053f887 (patch) | |
tree | 764bf7af33f9faee1dc1d7083a1d9885a6f218bd /t/t4013/diff.diff-tree_-c_master | |
parent | date.c: abort if the system time cannot handle one of our timestamps (diff) | |
download | tgif-28f4aee3fb1a45ebcda8ff84f94d6d2d0053f887.tar.xz |
use uintmax_t for timestamps
Previously, we used `unsigned long` for timestamps. This was only a good
choice on Linux, where we know implicitly that `unsigned long` is what is
used for `time_t`.
However, we want to use a different data type for timestamps for two
reasons:
- there is nothing that says that `unsigned long` should be the same data
type as `time_t`, and indeed, on 64-bit Windows for example, it is not:
`unsigned long` is 32-bit but `time_t` is 64-bit.
- even on 32-bit Linux, where `unsigned long` (and thereby `time_t`) is
32-bit, we *want* to be able to encode timestamps in Git that are
currently absurdly far in the future, *even if* the system library is
not able to format those timestamps into date strings.
So let's just switch to the maximal integer type available, which should
be at least 64-bit for all practical purposes these days. It certainly
cannot be worse than `unsigned long`, so...
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t4013/diff.diff-tree_-c_master')
0 files changed, 0 insertions, 0 deletions