Re: [PATCH v4 5/6] grep: enable recurse-submodules to work on <tree> objects
- From
- Brandon Williams <bmwill@google.com>
- Date
- Nov 21, 2016, 18:14 UTC
- Message-ID
- <20161121181437.GA149321@google.com>
- In-Reply-To
- <20161118225220.GA76630@google.com>
On 11/18, Brandon Williams wrote:
Show 9 quoted lines
> 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 wildmatching against partial matches (ie > directories and submodules) since currently the tree_entry_interesting > code path just punts and says 'well say it matches for now and check > again later' whenever it runs into a directory (I can't really make it > do that for submodules without a flag of somesort as tests could break). > Or maybe both?
Looks like my initial assumption was incorrect, I just needed to be smarter than punting when running into a submodule. Should be able to just ensure that the entry matches up to at least the first wildcard character before punting and all should be good.
-- Brandon Williams