Merge branch 'jk/config-path-include-fix'
[gitweb.git] / builtin / rm.c
index 171f37c1cc5371c307ef16ce67fefc1c40fbc2c2..960634dd0c52f1da689e8a54980e5e81cf2d2f36 100644 (file)
@@ -308,7 +308,7 @@ int cmd_rm(int argc, const char **argv, const char *prefix)
 
        for (i = 0; i < active_nr; i++) {
                const struct cache_entry *ce = active_cache[i];
-               if (!match_pathspec_depth(&pathspec, ce->name, ce_namelen(ce), 0, seen))
+               if (!ce_path_match(ce, &pathspec, seen))
                        continue;
                ALLOC_GROW(list.entry, list.nr + 1, list.alloc);
                list.entry[list.nr].name = xstrdup(ce->name);