Fix LFS CLI output parsing

Add label for LFS inclusion list
Fix deprecated flag
This commit is contained in:
kas 2022-04-02 13:53:51 +02:00
parent 0d184b93b1
commit 206e2d1c61
2 changed files with 3 additions and 2 deletions

View File

@ -741,6 +741,7 @@ public:
QVBoxLayout *layout = new QVBoxLayout(this);
layout->addWidget(new QLabel(tr("Included patterns:")));
layout->addLayout(tableLayout);
layout->addWidget(new QLabel(tr("Excluded patterns:")));
layout->addWidget(excludedList);

View File

@ -1054,14 +1054,14 @@ QStringList Repository::lfsEnvironment()
Repository::LfsTracking Repository::lfsTracked()
{
QString output = lfsExecute({"track"});
QStringList lines = output.split('\n', QString::SkipEmptyParts);
QStringList lines = output.split('\n', Qt::SkipEmptyParts);
if (!lines.isEmpty())
lines.removeFirst();
QStringList tracked, excluded;
bool excluding = false;
foreach (const QString &line, lines) {
if (line == "Listing excluded patterns") {
if (line[0] != ' ') {
excluding = true;
} else if (excluding) {
excluded.append(line.trimmed().section(' ', 0, 0));