]> git.ipfire.org Git - thirdparty/git.git/blobdiff - builtin/rm.c
Merge branches 'bw/ls-files-sans-the-index' and 'bw/config-h' into bw/repo-object
[thirdparty/git.git] / builtin / rm.c
index 7c323d01235bf8bbb341004c843761dad99590d2..52826d137935ca6698006258ebdb8b207f7161df 100644 (file)
@@ -4,6 +4,7 @@
  * Copyright (C) Linus Torvalds 2006
  */
 #include "builtin.h"
+#include "config.h"
 #include "lockfile.h"
 #include "dir.h"
 #include "cache-tree.h"
@@ -129,7 +130,7 @@ static int check_local_mod(struct object_id *head, int index_only)
                ce = active_cache[pos];
 
                if (lstat(ce->name, &st) < 0) {
-                       if (errno != ENOENT && errno != ENOTDIR)
+                       if (!is_missing_file_error(errno))
                                warning_errno(_("failed to stat '%s'"), ce->name);
                        /* It already vanished from the working tree */
                        continue;