]> git.ipfire.org Git - thirdparty/git.git/blobdiff - diff-lib.c
t2104: style fixes
[thirdparty/git.git] / diff-lib.c
index 0e9ec4f68afb01f23d9b9a0142d2ffb2cd1cc79b..6c8df04273702fa47215dffa263477df347900ee 100644 (file)
@@ -2,7 +2,6 @@
  * Copyright (C) 2005 Junio C Hamano
  */
 #include "git-compat-util.h"
-#include "quote.h"
 #include "commit.h"
 #include "diff.h"
 #include "diffcore.h"
  */
 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;