Merge branch 'lt/case-insensitive'
[git/git.git] / read-cache.c
index 6b7d16c..3b20a14 100644 (file)
@@ -1344,7 +1344,7 @@ int write_index(const struct index_state *istate, int newfd)
                struct cache_entry *ce = cache[i];
                if (ce->ce_flags & CE_REMOVE)
                        continue;
-               if (is_racy_timestamp(istate, ce))
+               if (!ce_uptodate(ce) && is_racy_timestamp(istate, ce))
                        ce_smudge_racily_clean_entry(ce);
                if (ce_write_entry(&c, newfd, ce) < 0)
                        return -1;