Re: [PATCH v4 5/6] grep: enable recurse-submodules to work on objects

2016-11-21 Thread Brandon Williams
On 11/18, Brandon Williams wrote: > Also, in order to use the tree_entry_interesting code it looks like I'll > either have to pipe through a flag saying 'yes i want to match against > submodules' like I did for the other pathspec codepath. Either that or > add functionality to perform

Re: [PATCH v4 5/6] grep: enable recurse-submodules to work on objects

2016-11-18 Thread Brandon Williams
On 11/18, Junio C Hamano wrote: > Brandon Williams writes: > > > @@ -671,12 +707,29 @@ static int grep_tree(struct grep_opt *opt, const > > struct pathspec *pathspec, > > enum interesting match = entry_not_interesting; > > struct name_entry entry; > > int

Re: [PATCH v4 5/6] grep: enable recurse-submodules to work on objects

2016-11-18 Thread Junio C Hamano
Brandon Williams writes: > @@ -671,12 +707,29 @@ static int grep_tree(struct grep_opt *opt, const struct > pathspec *pathspec, > enum interesting match = entry_not_interesting; > struct name_entry entry; > int old_baselen = base->len; > + struct strbuf

[PATCH v4 5/6] grep: enable recurse-submodules to work on objects

2016-11-18 Thread Brandon Williams
Teach grep to recursively search in submodules when provided with a object. This allows grep to search a submodule based on the state of the submodule that is present in a commit of the super project. When grep is provided with a object, the name of the object is prefixed to all output. In