]> git.ipfire.org Git - thirdparty/git.git/blobdiff - diff-lib.c
t2104: style fixes
[thirdparty/git.git] / diff-lib.c
index 8fde93d7cac78d9fee3f3326ae4fff2e36a6c009..6c8df04273702fa47215dffa263477df347900ee 100644 (file)
  */
 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;