summaryrefslogtreecommitdiff
path: root/src/odb_pack.c
diff options
context:
space:
mode:
authornulltoken <emeric.fermas@gmail.com>2011-03-20 18:36:25 +0100
committerVicent Marti <tanoku@gmail.com>2011-03-23 00:07:58 +0200
commit56d8ca266c92e51a1b38ac68b7aa6a24193f5812 (patch)
tree83e188bcb8d157cd10774ecaabe0a4a42561f5b6 /src/odb_pack.c
parentfe1920206b7fb780486dcef14d0d6f01835b430d (diff)
downloadlibgit2-56d8ca266c92e51a1b38ac68b7aa6a24193f5812.tar.gz
Switch from time_t to git_time_t
git_time_t is defined as a signed 64 integer. This allows a true predictable multiplatform behavior.
Diffstat (limited to 'src/odb_pack.c')
-rw-r--r--src/odb_pack.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/odb_pack.c b/src/odb_pack.c
index 65210f0b0..8c527bcf3 100644
--- a/src/odb_pack.c
+++ b/src/odb_pack.c
@@ -93,7 +93,7 @@ struct pack_file {
git_oid *bad_object_sha1; /* array of git_oid */
int index_version;
- time_t mtime;
+ git_time_t mtime;
int pack_fd;
unsigned pack_local:1, pack_keep:1;
git_oid sha1;
@@ -827,7 +827,7 @@ static int packfile_check(struct pack_file **pack_out, const char *path, int loc
*/
p->pack_size = (off_t)st.st_size;
p->pack_local = local;
- p->mtime = st.st_mtime;
+ p->mtime = (git_time_t)st.st_mtime;
/* see if we can parse the sha1 oid in the packfile name */
if (path_len < 40 ||