diff --git a/diff-lib.c b/diff-lib.c index e533b436af..a834e5bad6 100644 --- a/diff-lib.c +++ b/diff-lib.c @@ -38,7 +38,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;