Commit 948fad02 authored by Orgad Shaneh's avatar Orgad Shaneh Committed by Orgad Shaneh

Git: Recurse into submodules on grep if applicable (Git >= 2.13)

Change-Id: I5028d6a46749b22cc0e0f5707c9e283126511902
Reviewed-by: Tobias Hunger's avatarTobias Hunger <tobias.hunger@qt.io>
parent 99af4ae8
...@@ -144,7 +144,8 @@ public: ...@@ -144,7 +144,8 @@ public:
GitClient *client = GitPlugin::client(); GitClient *client = GitPlugin::client();
QStringList arguments = { QStringList arguments = {
"-c", "color.grep.match=bold red", "-c", "color.grep.match=bold red",
"grep", "-zn", "--no-full-name", "--color=always" "-c", "color.grep=always",
"grep", "-zn", "--no-full-name"
}; };
if (!(m_parameters.flags & FindCaseSensitively)) if (!(m_parameters.flags & FindCaseSensitively))
arguments << "-i"; arguments << "-i";
...@@ -154,6 +155,8 @@ public: ...@@ -154,6 +155,8 @@ public:
arguments << "-P"; arguments << "-P";
else else
arguments << "-F"; arguments << "-F";
if (client->gitVersion() >= 0x021300)
arguments << "--recurse-submodules";
arguments << "-e" << m_parameters.text; arguments << "-e" << m_parameters.text;
GitGrepParameters params = m_parameters.searchEngineParameters.value<GitGrepParameters>(); GitGrepParameters params = m_parameters.searchEngineParameters.value<GitGrepParameters>();
if (!params.ref.isEmpty()) { if (!params.ref.isEmpty()) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment