X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=entry.c;h=915514aa5c43d3fd39f077a79f63ac27b841d255;hb=f29ac4f1b04c9cf84509e4a80f27f10b4373a446;hp=5daacc2fe51eada819bedea05f958fbf87f5b889;hpb=796b13781aecce551b8f92049a66646e60f31dce;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; }