summaryrefslogtreecommitdiff
path: root/t/helper/test-date.c
diff options
context:
space:
mode:
authorLibravatar Johannes Schindelin <johannes.schindelin@gmx.de>2017-04-21 12:45:44 +0200
committerLibravatar Junio C Hamano <gitster@pobox.com>2017-04-23 20:19:15 -0700
commit1aeb7e756c82d31e46712ec7557c4cbae37dccd9 (patch)
treeab7e2a304b1a310d112bd168babd76b88714be2e /t/helper/test-date.c
parentt0006 & t5000: skip "far in the future" test when time_t is too limited (diff)
downloadtgif-1aeb7e756c82d31e46712ec7557c4cbae37dccd9.tar.xz
parse_timestamp(): specify explicitly where we parse timestamps
Currently, Git's source code represents all timestamps as `unsigned long`. In preparation for using a more appropriate data type, let's introduce a symbol `parse_timestamp` (currently being defined to `strtoul`) where appropriate, so that we can later easily switch to, say, use `strtoull()` instead. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/helper/test-date.c')
-rw-r--r--t/helper/test-date.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/t/helper/test-date.c b/t/helper/test-date.c
index ac7c66c733..52d1fc3445 100644
--- a/t/helper/test-date.c
+++ b/t/helper/test-date.c
@@ -34,7 +34,7 @@ static void show_dates(const char **argv, const char *format)
* Do not use our normal timestamp parsing here, as the point
* is to test the formatting code in isolation.
*/
- t = strtol(*argv, &arg, 10);
+ t = parse_timestamp(*argv, &arg, 10);
while (*arg == ' ')
arg++;
tz = atoi(arg);