Commit c125fbbe authored by Orgad Shaneh's avatar Orgad Shaneh Committed by Orgad Shaneh

Git: Refix filtering of obsolete branches when adding a branch

It was fixed in 62c60c6d but broke again
by 04eb0122.

Task-number: QTCREATORBUG-16264
Change-Id: I1130d5c2eda3320714913570441499be0d55c8fe
Reviewed-by: default avatarAndré Hartmann <aha_1980@gmx.de>
parent 1e7bf7f7
......@@ -691,9 +691,13 @@ void BranchModel::parseOutputLine(const QString &line)
}
if (!m_oldBranchesIncluded && !current && dateTime.isValid()) {
const int age = dateTime.daysTo(QDateTime::currentDateTime());
if (age > Constants::OBSOLETE_COMMIT_AGE_IN_DAYS)
const qint64 age = dateTime.daysTo(QDateTime::currentDateTime());
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;
}
}
bool showTags = m_client->settings().boolValue(GitSettings::showTagsKey);
......
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