Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fixed bug in defaultArgs.

Basically, the << operator was mutating the default args instead of just
using them.  Oops,
  • Loading branch information...
commit bd822959596ddefc8895f5a59ea3d2f2337320c1 1 parent 10b6088
@hef hef authored
Showing with 6 additions and 3 deletions.
  1. +6 −3 gitcommand.cpp
View
9 gitcommand.cpp
@@ -23,7 +23,8 @@ void GitCommand::status()
{
QSettings settings;
QString proc = settings.value("gitPath").toString();
- QStringList args = *defaultArgs << "status" << "--porcelain";
+ QStringList args = *defaultArgs;
+ args << "status" << "--porcelain";
gitStatusProcess->start(proc, args);
}
@@ -40,12 +41,13 @@ void GitCommand::lsIgnored()
{
QSettings settings;
QString proc = settings.value("gitPath").toString();
- QStringList args = *defaultArgs << "ls-files" << "--others" << "--ignored" << "--exclude-standard";
+ QStringList args = *defaultArgs;
+ args << "ls-files" << "--others" << "--ignored" << "--exclude-standard";
gitLSIgnoredProcess->start(proc, args);
}
void GitCommand::lsIgnoredOutput(int exitCode, QProcess::ExitStatus exitStatus)
{
- QByteArray result = gitStatusProcess->readAll();
+ QByteArray result = gitLSIgnoredProcess->readAll();
QString resultString(result);
QStringList fileList = resultString.split('\n',QString::SkipEmptyParts);
@@ -55,4 +57,5 @@ void GitCommand::setRepo(QString repo)
{
*defaultArgs = QStringList() << "--git-dir" << repo + "/.git" << "--work-tree" << repo;
status();
+ lsIgnored();
}
Please sign in to comment.
Something went wrong with that request. Please try again.