summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: c06ff49)
raw | patch | inline | side by side (parent: c06ff49)
author | Junio C Hamano <gitster@pobox.com> | |
Sun, 8 Mar 2009 20:51:33 +0000 (13:51 -0700) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Sun, 8 Mar 2009 21:04:39 +0000 (14:04 -0700) |
Some codepaths do not still use the ST_[CM]TIME_NSEC() pair of macros
introduced by the previous commit but assumes all systems use st_mtim
and st_ctim fields in "struct stat" to record nanosecond resolution part
of the file timestamps.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
introduced by the previous commit but assumes all systems use st_mtim
and st_ctim fields in "struct stat" to record nanosecond resolution part
of the file timestamps.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin-fetch-pack.c | patch | blob | history | |
read-cache.c | patch | blob | history |
diff --git a/builtin-fetch-pack.c b/builtin-fetch-pack.c
index 59b0b0a796b65b23ff0b9c4d219869b4293f60c7..1d7e02326f5d0da5533ef92c3b1b31c61cef9758 100644 (file)
--- a/builtin-fetch-pack.c
+++ b/builtin-fetch-pack.c
die("shallow file was removed during fetch");
} else if (st.st_mtime != mtime.sec
#ifdef USE_NSEC
- || st.st_mtim.tv_nsec != mtime.nsec
+ || ST_CTIME_NSEC(st) != mtime.nsec
#endif
)
die("shallow file was changed during fetch");
diff --git a/read-cache.c b/read-cache.c
index b819abbd0003577a2b1f9576a09bce59aacbcdb0..7f74c8d16126ec72bba98bd5b31da0f37f499691 100644 (file)
--- a/read-cache.c
+++ b/read-cache.c
changed |= CTIME_CHANGED;
#ifdef USE_NSEC
- if (ce->ce_mtime.nsec != (unsigned int)st->st_mtim.tv_nsec)
+ if (ce->ce_mtime.nsec != ST_MTIME_NSEC(*st))
changed |= MTIME_CHANGED;
- if (trust_ctime && ce->ce_ctime.nsec != (unsigned int)st->st_ctim.tv_nsec)
+ if (trust_ctime && ce->ce_ctime.nsec != ST_CTIME_NSEC(*st))
changed |= CTIME_CHANGED;
#endif