forked from qt-creator/qt-creator
Git: Make commit work on Windows
This commit is contained in:
@@ -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()) {
|
||||||
|
Reference in New Issue
Block a user