diff options
Diffstat (limited to 'diff-lib.c')
-rw-r--r-- | diff-lib.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/diff-lib.c b/diff-lib.c index 8fde93d7ca..6c8df04273 100644 --- a/diff-lib.c +++ b/diff-lib.c @@ -37,7 +37,13 @@ */ static int check_removed(const struct cache_entry *ce, struct stat *st) { - if (lstat(ce->name, st) < 0) { + int stat_err; + + if (!(ce->ce_flags & CE_FSMONITOR_VALID)) + stat_err = lstat(ce->name, st); + else + stat_err = fake_lstat(ce, st); + if (stat_err < 0) { if (!is_missing_file_error(errno)) return -1; return 1; |