diff options
author | Junio C Hamano <gitster@pobox.com> | 2019-01-14 15:29:28 -0800 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2019-01-14 15:29:28 -0800 |
commit | d6f05a435f9c89f8c9860c7af692942768d81584 (patch) | |
tree | 7b43bdb292f9cda801778647a67ddc2662504067 /builtin/grep.c | |
parent | Merge branch 'md/list-lazy-objects-fix' (diff) | |
parent | tree-walk: support :(attr) matching (diff) | |
download | tgif-d6f05a435f9c89f8c9860c7af692942768d81584.tar.xz |
Merge branch 'nd/attr-pathspec-in-tree-walk'
The traversal over tree objects has learned to honor
":(attr:label)" pathspec match, which has been implemented only for
enumerating paths on the filesystem.
* nd/attr-pathspec-in-tree-walk:
tree-walk: support :(attr) matching
dir.c: move, rename and export match_attrs()
pathspec.h: clean up "extern" in function declarations
tree-walk.c: make tree_entry_interesting() take an index
tree.c: make read_tree*() take 'struct repository *'
Diffstat (limited to 'builtin/grep.c')
-rw-r--r-- | builtin/grep.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/builtin/grep.c b/builtin/grep.c index bad9c0a3d5..4748195ae1 100644 --- a/builtin/grep.c +++ b/builtin/grep.c @@ -553,7 +553,8 @@ static int grep_tree(struct grep_opt *opt, const struct pathspec *pathspec, if (match != all_entries_interesting) { strbuf_addstr(&name, base->buf + tn_len); - match = tree_entry_interesting(&entry, &name, + match = tree_entry_interesting(repo->index, + &entry, &name, 0, pathspec); strbuf_setlen(&name, name_base_len); |