diff options
-rw-r--r-- | builtin-fetch-pack.c | 2 | ||||
-rw-r--r-- | read-cache.c | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/builtin-fetch-pack.c b/builtin-fetch-pack.c index 1d7e02326f..8b33861681 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_CTIME_NSEC(st) != mtime.nsec + || ST_MTIME_NSEC(st) != mtime.nsec #endif ) die("shallow file was changed during fetch"); diff --git a/read-cache.c b/read-cache.c index 7f74c8d161..3f587110cb 100644 --- a/read-cache.c +++ b/read-cache.c @@ -1563,8 +1563,8 @@ int write_index(struct index_state *istate, int newfd) if (ce_flush(&c, newfd) || fstat(newfd, &st)) return -1; - istate->timestamp.sec = (unsigned int)st.st_ctime; - istate->timestamp.nsec = ST_CTIME_NSEC(st); + istate->timestamp.sec = (unsigned int)st.st_mtime; + istate->timestamp.nsec = ST_MTIME_NSEC(st); return 0; } |