X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=entry.c;h=915514aa5c43d3fd39f077a79f63ac27b841d255;hb=ea0b767c1ea66f687e58a9fcff45a5a518e699c3;hp=5daacc2fe51eada819bedea05f958fbf87f5b889;hpb=0b3035fe15bfd1d1f7cfab71819cb2cf4fc40d61;p=git.git diff --git a/entry.c b/entry.c index 5daacc2fe..915514aa5 100644 --- a/entry.c +++ b/entry.c @@ -147,7 +147,8 @@ static int write_entry(struct cache_entry *ce, char *path, const struct checkout wrote = write_in_full(fd, new, size); /* use fstat() only when path == ce->name */ - if (state->refresh_cache && !to_tempfile && !state->base_dir_len) { + if (fstat_is_reliable() && + state->refresh_cache && !to_tempfile && !state->base_dir_len) { fstat(fd, &st); fstat_done = 1; }