forked from qt-creator/qt-creator
Git: Refix filtering of obsolete branches when adding a branch
It was fixed in62c60c6d1cbut broke again by04eb012267. Task-number: QTCREATORBUG-16264 Change-Id: I1130d5c2eda3320714913570441499be0d55c8fe Reviewed-by: André Hartmann <aha_1980@gmx.de>
This commit is contained in:
committed by
Orgad Shaneh
parent
1e7bf7f721
commit
c125fbbe97
@@ -691,9 +691,13 @@ void BranchModel::parseOutputLine(const QString &line)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (!m_oldBranchesIncluded && !current && dateTime.isValid()) {
|
if (!m_oldBranchesIncluded && !current && dateTime.isValid()) {
|
||||||
const int age = dateTime.daysTo(QDateTime::currentDateTime());
|
const qint64 age = dateTime.daysTo(QDateTime::currentDateTime());
|
||||||
if (age > Constants::OBSOLETE_COMMIT_AGE_IN_DAYS)
|
if (age > Constants::OBSOLETE_COMMIT_AGE_IN_DAYS) {
|
||||||
|
const QString heads = "refs/heads/";
|
||||||
|
if (fullName.startsWith(heads))
|
||||||
|
m_obsoleteLocalBranches.append(fullName.mid(heads.size()));
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
bool showTags = m_client->settings().boolValue(GitSettings::showTagsKey);
|
bool showTags = m_client->settings().boolValue(GitSettings::showTagsKey);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user