summaryrefslogtreecommitdiff
path: root/contrib/buildsystems
diff options
context:
space:
mode:
authorLibravatar Brandon Williams <bmwill@google.com>2016-12-16 11:03:20 -0800
committerLibravatar Junio C Hamano <gitster@pobox.com>2016-12-22 11:47:33 -0800
commit0281e487fd913bd9a32a710f3109ff3002f3e4a9 (patch)
tree3b5b3bda83044726df670a446bbf6764d2cde6da /contrib/buildsystems
parentgrep: add submodules as a grep source type (diff)
downloadtgif-0281e487fd913bd9a32a710f3109ff3002f3e4a9.tar.xz
grep: optionally recurse into submodules
Allow grep to recognize submodules and recursively search for patterns in each submodule. This is done by forking off a process to recursively call grep on each submodule. The top level --super-prefix option is used to pass a path to the submodule which can in turn be used to prepend to output or in pathspec matching logic. Recursion only occurs for submodules which have been initialized and checked out by the parent project. If a submodule hasn't been initialized and checked out it is simply skipped. In order to support the existing multi-threading infrastructure in grep, output from each child process is captured in a strbuf so that it can be later printed to the console in an ordered fashion. To limit the number of theads that are created, each child process has half the number of threads as its parents (minimum of 1), otherwise we potentailly have a fork-bomb. Signed-off-by: Brandon Williams <bmwill@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'contrib/buildsystems')
0 files changed, 0 insertions, 0 deletions