Git: make git grep not duplicate leading path names

Make sure we pass --no-full-name to counter the grep.fullname=true
option that the user may have set. Otherwise, Creator will complain that
it can't find the files that matched the search terms if the search
directory was not the root of the Git repository.

Change-Id: I149e0540c00745fe8119fffd14628a3d7887e55e
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
This commit is contained in:
Thiago Macieira
2016-07-18 17:34:25 -07:00
committed by Orgad Shaneh
parent c0da4e7d80
commit cdf1c924a3

View File

@@ -135,6 +135,7 @@ public:
QStringList arguments; QStringList arguments;
arguments << QLatin1String("-c") << QLatin1String("color.grep.match=bold red") arguments << QLatin1String("-c") << QLatin1String("color.grep.match=bold red")
<< QLatin1String("grep") << QLatin1String("-zn") << QLatin1String("grep") << QLatin1String("-zn")
<< QLatin1String("--no-full-name")
<< QLatin1String("--color=always"); << QLatin1String("--color=always");
if (!(m_parameters.flags & FindCaseSensitively)) if (!(m_parameters.flags & FindCaseSensitively))
arguments << QLatin1String("-i"); arguments << QLatin1String("-i");