diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/commit.c | 2 | ||||
-rw-r--r-- | src/index.c | 12 | ||||
-rw-r--r-- | src/odb_pack.c | 4 | ||||
-rw-r--r-- | src/signature.c | 2 |
4 files changed, 10 insertions, 10 deletions
diff --git a/src/commit.c b/src/commit.c index d5d6ebd8a..03b111da5 100644 --- a/src/commit.c +++ b/src/commit.c @@ -315,7 +315,7 @@ GIT_COMMIT_GETTER(const git_signature *, author, commit->author) GIT_COMMIT_GETTER(const git_signature *, committer, commit->committer) GIT_COMMIT_GETTER(const char *, message, commit->message) GIT_COMMIT_GETTER(const char *, message_short, commit->message_short) -GIT_COMMIT_GETTER(time_t, time, commit->committer->when.time) +GIT_COMMIT_GETTER(git_time_t, time, commit->committer->when.time) GIT_COMMIT_GETTER(int, time_offset, commit->committer->when.offset) GIT_COMMIT_GETTER(unsigned int, parentcount, commit->parent_oids.length) diff --git a/src/index.c b/src/index.c index 6a355e11b..34208731c 100644 --- a/src/index.c +++ b/src/index.c @@ -312,8 +312,8 @@ int git_index_add(git_index *index, const char *rel_path, int stage) memset(&entry, 0x0, sizeof(git_index_entry)); - entry.ctime.seconds = st.st_ctime; - entry.mtime.seconds = st.st_mtime; + entry.ctime.seconds = (git_time_t)st.st_ctime; + entry.mtime.seconds = (git_time_t)st.st_mtime; /* entry.mtime.nanoseconds = st.st_mtimensec; */ /* entry.ctime.nanoseconds = st.st_ctimensec; */ entry.dev= st.st_rdev; @@ -491,10 +491,10 @@ static size_t read_entry(git_index_entry *dest, const void *buffer, size_t buffe source = (const struct entry_short *)(buffer); - dest->ctime.seconds = (time_t)ntohl(source->ctime.seconds); - dest->ctime.nanoseconds = (time_t)ntohl(source->ctime.nanoseconds); - dest->mtime.seconds = (time_t)ntohl(source->mtime.seconds); - dest->mtime.nanoseconds = (time_t)ntohl(source->mtime.nanoseconds); + dest->ctime.seconds = (git_time_t)ntohl(source->ctime.seconds); + dest->ctime.nanoseconds = ntohl(source->ctime.nanoseconds); + dest->mtime.seconds = (git_time_t)ntohl(source->mtime.seconds); + dest->mtime.nanoseconds = ntohl(source->mtime.nanoseconds); dest->dev = ntohl(source->dev); dest->ino = ntohl(source->ino); dest->mode = ntohl(source->mode); 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 || diff --git a/src/signature.c b/src/signature.c index 13816c396..412637600 100644 --- a/src/signature.c +++ b/src/signature.c @@ -38,7 +38,7 @@ void git_signature_free(git_signature *sig) free(sig); } -git_signature *git_signature_new(const char *name, const char *email, time_t time, int offset) +git_signature *git_signature_new(const char *name, const char *email, git_time_t time, int offset) { git_signature *p = NULL; |