forked from qt-creator/qt-creator
Git: Remove branches from show header
It is too slow on large repositories. Will be revived in 3.2 with a trigger button. Task-number: QTCREATORBUG-11293 Change-Id: I6ba2028b280821b2acb49b7664ec9ece063c8981 Reviewed-by: Przemyslaw Gorszkowski <pgorszkowski@gmail.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
This commit is contained in:
committed by
Orgad Shaneh
parent
b67157fb19
commit
5101938974
@@ -2861,21 +2861,6 @@ QString GitClient::extendedShowDescription(const QString &workingDirectory, cons
|
||||
modText.insert(lastHeaderLine, QLatin1String("Precedes: ") + precedes + QLatin1Char('\n'));
|
||||
if (!follows.isEmpty())
|
||||
modText.insert(lastHeaderLine, QLatin1String("Follows: ") + follows + QLatin1Char('\n'));
|
||||
QString moreBranches;
|
||||
QStringList branches = synchronousBranchesForCommit(workingDirectory, commit);
|
||||
const int branchCount = branches.count();
|
||||
// If there are more than 20 branches, list first 10 followed by a hint
|
||||
if (branchCount > 20) {
|
||||
const int leave = 10;
|
||||
//: Displayed after the untranslated message "Branches: branch1, branch2 'and %n more'" in git show.
|
||||
moreBranches = QLatin1Char(' ') + tr("and %n more", 0, branchCount - leave);
|
||||
branches.erase(branches.begin() + leave, branches.end());
|
||||
}
|
||||
if (!branches.isEmpty()) {
|
||||
modText.insert(lastHeaderLine, QLatin1String("Branches: ")
|
||||
+ branches.join(QLatin1String(", ")) + moreBranches
|
||||
+ QLatin1Char('\n'));
|
||||
}
|
||||
return modText;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user