On Fri, Sep 9, 2016 at 4:01 PM, Junio C Hamano <gits...@pobox.com> wrote: > Brandon Williams <bmw...@google.com> writes: > >> Allow ls-files to recognize submodules in order to retrieve a list of >> files from a repository's submodules. This is done by forking off a >> process to recursively call ls-files on all submodules. > > While I see why "ls-files --recurse-submodules" sounds nice ("hey, I > can get list of _all_ the files here"), and I am quite happy with > the quality of implementation (not just the code but its > documentation and test)
The plan is to hook the ls-files machinery into git-grep as the way of obtaining files to grep for a pattern. As git-grep has a thread pool already, getting the list of files single threaded is more beneficial as e.g. calling git-grep recursively for submodules, as then you may have a fork bomb. > >> diff --git a/t/t3007-ls-files-recurse-submodules.sh >> b/t/t3007-ls-files-recurse-submodules.sh > We used to do that when we didn't know better. > Oops, a lot of stuff slipped through the first internal review.