From 64e925d2be5403236e7d440e1b9ae832375e4033 Mon Sep 17 00:00:00 2001
From: Daniel Molkentin <daniel.molkentin@nokia.com>
Date: Tue, 2 Jun 2009 12:21:20 +0200
Subject: [PATCH] Fix for recent git version where git.exe became git.cmd.

Run git as a cmd.exe subprocess as a workaround. In the long term
we should look into enabling QProcess to properly handle .bat and
.cmd files.

Reviewed-By: Ossi
---
 src/plugins/git/gitcommand.cpp | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/plugins/git/gitcommand.cpp b/src/plugins/git/gitcommand.cpp
index 77b945802ef..b6f5abec964 100644
--- a/src/plugins/git/gitcommand.cpp
+++ b/src/plugins/git/gitcommand.cpp
@@ -132,7 +132,9 @@ void GitCommand::run()
         if (Git::Constants::debug)
             qDebug() << "GitCommand::run" << j << '/' << count << m_jobs.at(j).arguments;
 
-        process.start(m_binaryPath, m_jobs.at(j).arguments);
+        QStringList args;
+        args << "/c" << m_binaryPath << m_jobs.at(j).arguments;
+        process.start("cmd.exe", args);
         if(!process.waitForStarted()) {
             ok = false;
             error += QString::fromLatin1("Error: \"%1\" could not be started: %2").arg(m_binaryPath, process.errorString());
-- 
GitLab