forked from qt-creator/qt-creator
Git: Recurse into submodules on grep if applicable (Git >= 2.13)
Change-Id: I5028d6a46749b22cc0e0f5707c9e283126511902 Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
This commit is contained in:
committed by
Orgad Shaneh
parent
99af4ae8e6
commit
948fad02d1
@@ -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:
|
|||||||
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()) {
|
||||||
|
Reference in New Issue
Block a user