sha1_file: teach sha1_object_info_extended more flags
[gitweb.git] / builtin / rm.c
index fb79dcab181558e79e3934363cac3c712ffbd3aa..b39f10fcb64f047090967dbf8b31120d2beb1b67 100644 (file)
@@ -129,7 +129,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;
@@ -271,8 +271,7 @@ int cmd_rm(int argc, const char **argv, const char *prefix)
                die(_("index file corrupt"));
 
        parse_pathspec(&pathspec, 0,
-                      PATHSPEC_PREFER_CWD |
-                      PATHSPEC_STRIP_SUBMODULE_SLASH_CHEAP,
+                      PATHSPEC_PREFER_CWD,
                       prefix, argv);
        refresh_index(&the_index, REFRESH_QUIET, &pathspec, NULL, NULL);