]> git.ipfire.org Git - thirdparty/git.git/commit - date.c
PRItime: introduce a new "printf format" for timestamps
authorJohannes Schindelin <johannes.schindelin@gmx.de>
Fri, 21 Apr 2017 10:45:48 +0000 (12:45 +0200)
committerJunio C Hamano <gitster@pobox.com>
Mon, 24 Apr 2017 03:19:15 +0000 (20:19 -0700)
commitcb71f8bdb5a105cd5b66142b887989d9addc82d0
treee5d673bfdd396ebfc6fb0957a86dd532c25e995b
parent1aeb7e756c82d31e46712ec7557c4cbae37dccd9
PRItime: introduce a new "printf format" for timestamps

Currently, Git's source code treats all timestamps as if they were
unsigned longs. Therefore, it is okay to write "%lu" when printing them.

There is a substantial problem with that, though: at least on Windows,
time_t is *larger* than unsigned long, and hence we will want to switch
away from the ill-specified `unsigned long` data type.

So let's introduce the pseudo format "PRItime" (currently simply being
defined to "lu") to make it easier to change the data type used for
timestamps.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
15 files changed:
builtin/blame.c
builtin/fsck.c
builtin/log.c
builtin/receive-pack.c
builtin/rev-list.c
builtin/rev-parse.c
date.c
fetch-pack.c
git-compat-util.h
refs/files-backend.c
t/helper/test-date.c
t/helper/test-parse-options.c
t/helper/test-ref-store.c
upload-pack.c
vcs-svn/fast_export.c