aboutsummaryrefslogtreecommitdiff
path: root/builtin
diff options
context:
space:
mode:
authorNguyễn Thái Ngọc Duy <pclouds@gmail.com>2010-12-15 22:02:52 +0700
committerJunio C Hamano <gitster@pobox.com>2011-02-03 14:08:30 -0800
commit2ed2437a143391c9e882318874905c964f313977 (patch)
tree43b8b563d46665573560a071a6ee8f7557a33525 /builtin
parentf34bbc15ce0749a3e9f749f0fef6c486e1482719 (diff)
downloadgit-2ed2437a143391c9e882318874905c964f313977.tar.gz
git-2ed2437a143391c9e882318874905c964f313977.tar.xz
grep: use match_pathspec_depth() for cache/worktree grepping
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin')
-rw-r--r--builtin/grep.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/builtin/grep.c b/builtin/grep.c
index ad9ec4a29..16a2fde94 100644
--- a/builtin/grep.c
+++ b/builtin/grep.c
@@ -591,7 +591,7 @@ static int grep_cache(struct grep_opt *opt, const struct pathspec *pathspec, int
struct cache_entry *ce = active_cache[nr];
if (!S_ISREG(ce->ce_mode))
continue;
- if (!pathspec_matches(pathspec->raw, ce->name, opt->max_depth))
+ if (!match_pathspec_depth(pathspec, ce->name, ce_namelen(ce), 0, NULL))
continue;
/*
* If CE_VALID is on, we assume worktree file and its cache entry