grep: use match_pathspec_depth() for cache/worktree grepping