VCS: Never try to run empty binaries

Never try to run empty binaries.

Task-number: QTCREATORBUG-6849
Change-Id: I591fdb9d39394fc8097908f5934a1a96518859cb
Reviewed-by: Hugues Delorme <delorme.hugues@fougsys.fr>
This commit is contained in:
Tobias Hunger
2012-01-25 16:26:47 +01:00
parent 1fe85174eb
commit a309c26f1b
2 changed files with 19 additions and 3 deletions

View File

@@ -2329,6 +2329,9 @@ QString GitClient::gitVersionString(bool silent, QString *errorMessage) const
// determine version as '(major << 16) + (minor << 8) + patch' or 0.
unsigned GitClient::synchronousGitVersion(bool silent, QString *errorMessage) const
{
if (gitBinaryPath().isEmpty())
return 0;
// run git --version
QByteArray outputText;
QByteArray errorText;