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:
GitClient *client = GitPlugin::client();
QStringList arguments = {
"-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))
arguments << "-i";
......@@ -154,6 +155,8 @@ public:
arguments << "-P";
else
arguments << "-F";
if (client->gitVersion() >= 0x021300)
arguments << "--recurse-submodules";
arguments << "-e" << m_parameters.text;
GitGrepParameters params = m_parameters.searchEngineParameters.value<GitGrepParameters>();
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