Commit 78c241b0 authored by Waqar Ahmed's avatar Waqar Ahmed
Browse files

Show untracked files in project plugin

parent b6667059
......@@ -435,6 +435,26 @@ QStringList KateProjectWorker::gitLsFiles(const QDir &dir)
}
}
// untracked files
{
args.clear();
args << QStringLiteral("ls-files") << QStringLiteral("-z") << QStringLiteral("--others") << QStringLiteral("--exclude-standard") << QStringLiteral(".");
git.setArguments(args);
git.start();
if (!git.waitForStarted() || !git.waitForFinished(-1)) {
return files;
}
const QList<QByteArray> byteArrayList = git.readAllStandardOutput().split('\0');
for (const QByteArray &byteArray : byteArrayList) {
const QString fileName = QString::fromUtf8(byteArray);
if (!fileName.isEmpty()) {
files << fileName;
}
}
}
return files;
}
......
Markdown is supported
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