path: add a function to check for path suffix
[gitweb.git] / builtin / rm.c
index 17086d3d97c536522720c589ea8f35d366536ea8..bf4a443e1369c2ef6131e5ac34be30c5a5d5b19f 100644 (file)
@@ -3,6 +3,7 @@
  *
  * Copyright (C) Linus Torvalds 2006
  */
+#define USE_THE_INDEX_COMPATIBILITY_MACROS
 #include "builtin.h"
 #include "config.h"
 #include "lockfile.h"
@@ -109,7 +110,7 @@ static int check_local_mod(struct object_id *head, int index_only)
                const struct cache_entry *ce;
                const char *name = list.entry[i].name;
                struct object_id oid;
-               unsigned mode;
+               unsigned short mode;
                int local_changes = 0;
                int staged_changes = 0;
 
@@ -272,7 +273,7 @@ int cmd_rm(int argc, const char **argv, const char *prefix)
        parse_pathspec(&pathspec, 0,
                       PATHSPEC_PREFER_CWD,
                       prefix, argv);
-       refresh_index(&the_index, REFRESH_QUIET, &pathspec, NULL, NULL);
+       refresh_index(&the_index, REFRESH_QUIET|REFRESH_UNMERGED, &pathspec, NULL, NULL);
 
        seen = xcalloc(pathspec.nr, 1);