]> git.ipfire.org Git - thirdparty/git.git/commit - fetch-pack.c
timestamp_t: a new data type for timestamps
authorJohannes Schindelin <johannes.schindelin@gmx.de>
Wed, 26 Apr 2017 19:29:31 +0000 (21:29 +0200)
committerJunio C Hamano <gitster@pobox.com>
Thu, 27 Apr 2017 04:07:39 +0000 (13:07 +0900)
commitdddbad728c93280fe54ef86699b6d70e2aab44d1
treec2a48100bf8597f0771e6737fda19e7255c737dc
parentcb71f8bdb5a105cd5b66142b887989d9addc82d0
timestamp_t: a new data type for timestamps

Git's source code assumes that unsigned long is at least as precise as
time_t. Which is incorrect, and causes a lot of problems, in particular
where unsigned long is only 32-bit (notably on Windows, even in 64-bit
versions).

So let's just use a more appropriate data type instead. In preparation
for this, we introduce the new `timestamp_t` data type.

By necessity, this is a very, very large patch, as it has to replace all
timestamps' data type in one go.

As we will use a data type that is not necessarily identical to `time_t`,
we need to be very careful to use `time_t` whenever we interact with the
system functions, and `timestamp_t` everywhere else.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
49 files changed:
Documentation/technical/api-parse-options.txt
archive-tar.c
archive-zip.c
archive.h
builtin/am.c
builtin/blame.c
builtin/fsck.c
builtin/gc.c
builtin/log.c
builtin/merge-base.c
builtin/name-rev.c
builtin/pack-objects.c
builtin/prune.c
builtin/receive-pack.c
builtin/reflog.c
builtin/show-branch.c
builtin/worktree.c
bundle.c
cache.h
commit.c
commit.h
config.c
credential-cache--daemon.c
date.c
fetch-pack.c
git-compat-util.h
http-backend.c
parse-options-cb.c
pretty.c
reachable.c
reachable.h
ref-filter.c
reflog-walk.c
refs.c
refs.h
refs/files-backend.c
revision.c
revision.h
sha1_name.c
t/helper/test-date.c
t/helper/test-parse-options.c
t/helper/test-ref-store.c
tag.c
tag.h
upload-pack.c
vcs-svn/fast_export.c
vcs-svn/fast_export.h
vcs-svn/svndump.c
wt-status.c