forked from qt-creator/qt-creator
Git: Use C locale when parsing the command output
Task-number: QTCREATORBUG-19017 Change-Id: Ib77d66e22d227d43245d352905f9b095f7d0f42b Reviewed-by: André Hartmann <aha_1980@gmx.de>
This commit is contained in:
committed by
Orgad Shaneh
parent
fa43c0d2b9
commit
5d5d0497e5
@@ -1758,7 +1758,8 @@ bool GitClient::cleanList(const QString &workingDirectory, const QString &module
|
||||
const QString directory = workingDirectory + '/' + modulePath;
|
||||
const QStringList arguments = {"clean", "--dry-run", flag};
|
||||
|
||||
const SynchronousProcessResponse resp = vcsFullySynchronousExec(directory, arguments);
|
||||
const SynchronousProcessResponse resp = vcsFullySynchronousExec(directory, arguments,
|
||||
VcsCommand::ForceCLocale);
|
||||
if (resp.result != SynchronousProcessResponse::Finished) {
|
||||
msgCannotRun(arguments, directory, resp.stdErr(), errorMessage);
|
||||
return false;
|
||||
@@ -2995,7 +2996,8 @@ bool GitClient::synchronousStashList(const QString &workingDirectory, QList<Stas
|
||||
stashes->clear();
|
||||
|
||||
const QStringList arguments = {"stash", "list", noColorOption};
|
||||
const SynchronousProcessResponse resp = vcsFullySynchronousExec(workingDirectory, arguments);
|
||||
const SynchronousProcessResponse resp = vcsFullySynchronousExec(workingDirectory, arguments,
|
||||
VcsCommand::ForceCLocale);
|
||||
if (resp.result != SynchronousProcessResponse::Finished) {
|
||||
msgCannotRun(arguments, workingDirectory, resp.stdErr(), errorMessage);
|
||||
return false;
|
||||
|
||||
@@ -54,8 +54,12 @@ bool MergeTool::start(const QString &workingDirectory, const QStringList &files)
|
||||
{
|
||||
QStringList arguments;
|
||||
arguments << "mergetool" << "-y" << files;
|
||||
QProcessEnvironment env = QProcessEnvironment::systemEnvironment();
|
||||
env.insert("LANG", "C");
|
||||
env.insert("LANGUAGE", "C");
|
||||
m_process = new QProcess(this);
|
||||
m_process->setWorkingDirectory(workingDirectory);
|
||||
m_process->setProcessEnvironment(env);
|
||||
const Utils::FileName binary = GitPlugin::client()->vcsBinary();
|
||||
VcsOutputWindow::appendCommand(workingDirectory, binary, arguments);
|
||||
m_process->start(binary.toString(), arguments);
|
||||
|
||||
Reference in New Issue
Block a user