summaryrefslogtreecommitdiff
path: root/builtin-fetch-pack.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2009-03-08 20:51:33 (GMT)
committerJunio C Hamano <gitster@pobox.com>2009-03-08 21:04:39 (GMT)
commit110c46a909fe27f5b8aff412a78cb821300fb985 (patch)
treef9c90dac0a903e6cc4011c0c07c58a7c38fee575 /builtin-fetch-pack.c
parentc06ff4908bf9ad8bf2448439a3574321c9399b17 (diff)
downloadgit-110c46a909fe27f5b8aff412a78cb821300fb985.zip
git-110c46a909fe27f5b8aff412a78cb821300fb985.tar.gz
git-110c46a909fe27f5b8aff412a78cb821300fb985.tar.bz2
Not all systems use st_[cm]tim field for ns resolution file timestamp
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>
Diffstat (limited to 'builtin-fetch-pack.c')
-rw-r--r--builtin-fetch-pack.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/builtin-fetch-pack.c b/builtin-fetch-pack.c
index 59b0b0a..1d7e023 100644
--- a/builtin-fetch-pack.c
+++ b/builtin-fetch-pack.c
@@ -807,7 +807,7 @@ struct ref *fetch_pack(struct fetch_pack_args *my_args,
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");