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>
This commit is contained in:
Johannes Schindelin
2017-04-21 12:45:44 +02:00
committed by Junio C Hamano
parent efac8ac84b
commit 1aeb7e756c
13 changed files with 20 additions and 18 deletions

View File

@ -882,7 +882,7 @@ static int hg_patch_to_mail(FILE *out, FILE *in, int keep_cr)
char *end;
errno = 0;
timestamp = strtoul(str, &end, 10);
timestamp = parse_timestamp(str, &end, 10);
if (errno)
return error(_("invalid timestamp"));