From 5101938974d61ddcf85f748358cfc9c9836511a0 Mon Sep 17 00:00:00 2001 From: Orgad Shaneh Date: Sat, 22 Mar 2014 19:59:19 +0200 Subject: [PATCH] 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 Reviewed-by: Friedemann Kleint Reviewed-by: Tobias Hunger --- src/plugins/git/gitclient.cpp | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/src/plugins/git/gitclient.cpp b/src/plugins/git/gitclient.cpp index 76d2edd144d..a1f8bf86c17 100644 --- a/src/plugins/git/gitclient.cpp +++ b/src/plugins/git/gitclient.cpp @@ -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; }