status: convert to use parse_pathspec
[gitweb.git] / dir.c
diff --git a/dir.c b/dir.c
index e28bc0d636d544a3305c9e6c71d666de568bc0fb..19978d3d59753a810503cf6dbac9eacb0f16c474 100644 (file)
--- a/dir.c
+++ b/dir.c
@@ -340,6 +340,8 @@ int match_pathspec_depth(const struct pathspec *ps,
 {
        int i, retval = 0;
 
+       GUARD_PATHSPEC(ps, PATHSPEC_FROMTOP | PATHSPEC_MAXDEPTH);
+
        if (!ps->nr) {
                if (!ps->recursive ||
                    !(ps->magic & PATHSPEC_MAXDEPTH) ||