Commit d301fb42 authored by Tobias Hunger's avatar Tobias Hunger
Browse files

Git: Fix description of git status progress

Remove color.status option. Creator can handle ANSI now, so there
is no need to suppress that for user-visible output anymore (Git
is intelligent enough to not print colors, even if we do not explicitly
ask it not to:-)

For the internal uses of git status: Prefer using --porcelain instead
of the -s format. That is meant to be stable and does not use colors

All supported git versions (>= 1.7.2) support --porcelain.

Task-number: QTCREATORBUG-13277
Change-Id: Idd88bcba0c4e4ed68bb27fbf475fe88fae497f1c
Reviewed-by: default avatarOrgad Shaneh <>
parent 685ea302
......@@ -701,12 +701,6 @@ static inline QString currentDocumentPath()
return QString();
static inline QStringList statusArguments()
return QStringList() << QLatin1String("-c") << QLatin1String("color.status=false")
<< QLatin1String("status");
static inline void msgCannotRun(const QString &message, QString *errorMessage)
if (errorMessage)
......@@ -1024,8 +1018,8 @@ void GitClient::merge(const QString &workingDirectory,
void GitClient::status(const QString &workingDirectory)
QStringList statusArgs = statusArguments();
statusArgs << QLatin1String("-u");
QStringList statusArgs;
statusArgs << QLatin1String("status") << QLatin1String("-u");
VcsCommand *command = executeGit(workingDirectory, statusArgs, 0, true);
connect(command, SIGNAL(finished(bool,int,QVariant)), VcsOutputWindow::instance(), SLOT(clearRepository()),
......@@ -2311,14 +2305,15 @@ GitClient::StatusResult GitClient::gitStatus(const QString &workingDirectory, St
QByteArray outputText;
QByteArray errorText;
QStringList statusArgs = statusArguments();
QStringList statusArgs;
statusArgs << QLatin1String("status");
if (mode & NoUntracked)
statusArgs << QLatin1String("--untracked-files=no");
statusArgs << QLatin1String("--untracked-files=all");
if (mode & NoSubmodules)
statusArgs << QLatin1String("--ignore-submodules=all");
statusArgs << QLatin1String("-s") << QLatin1String("-b");
statusArgs << QLatin1String("--porcelain") << QLatin1String("-b");
const bool statusRc = fullySynchronousGit(workingDirectory, statusArgs,
&outputText, &errorText, false);
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment