Docs: send-email: --smtp-server-port can take symbolic ports
[gitweb.git] / read-cache.c
index b819abbd0003577a2b1f9576a09bce59aacbcdb0..3f587110cb9d7be1890b7db68a0bdac35d48cd35 100644 (file)
@@ -204,9 +204,9 @@ static int ce_match_stat_basic(struct cache_entry *ce, struct stat *st)
                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
 
@@ -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;
 }