Git: Make commit work on Windows

This commit is contained in:
Friedemann Kleint
2009-08-25 09:57:58 +02:00
parent a5b22b18bd
commit 40f6f72a5d

View File

@@ -527,16 +527,16 @@ QStringList GitClient::processEnvironment() const
} }
bool GitClient::synchronousGit(const QString &workingDirectory, bool GitClient::synchronousGit(const QString &workingDirectory,
const QStringList &arguments, const QStringList &gitArguments,
QByteArray* outputText, QByteArray* outputText,
QByteArray* errorText, QByteArray* errorText,
bool logCommandToWindow) bool logCommandToWindow)
{ {
if (Git::Constants::debug) if (Git::Constants::debug)
qDebug() << "synchronousGit" << workingDirectory << arguments; qDebug() << "synchronousGit" << workingDirectory << gitArguments;
if (logCommandToWindow) if (logCommandToWindow)
VCSBase::VCSBaseOutputWindow::instance()->appendCommand(formatCommand(m_binaryPath, arguments)); VCSBase::VCSBaseOutputWindow::instance()->appendCommand(formatCommand(m_binaryPath, gitArguments));
QProcess process; QProcess process;
process.setWorkingDirectory(workingDirectory); process.setWorkingDirectory(workingDirectory);
@@ -545,8 +545,8 @@ bool GitClient::synchronousGit(const QString &workingDirectory,
QStringList args = binary(); QStringList args = binary();
const QString executable = args.front(); const QString executable = args.front();
args.pop_front(); args.pop_front();
args.append(arguments); args.append(gitArguments);
process.start(executable, arguments); process.start(executable, args);
process.closeWriteChannel(); process.closeWriteChannel();
if (!process.waitForFinished()) { if (!process.waitForFinished()) {