forked from qt-creator/qt-creator
Git: Limit length for revisions displayed in context menu
Change-Id: I335b49ed9af9c3f2ae083a03e4109173b3783f76 Reviewed-by: Tobias Hunger <tobias.hunger@nokia.com>
This commit is contained in:
committed by
Tobias Hunger
parent
0fb6aafdc3
commit
960bfeb46d
@@ -1071,13 +1071,20 @@ bool GitClient::synchronousParentRevisions(const QString &workingDirectory,
|
||||
}
|
||||
|
||||
// Short SHA1, author, subject
|
||||
static const char defaultShortLogFormatC[] = "%h (%an \"%s\")";
|
||||
static const char defaultShortLogFormatC[] = "%h (%an \"%s";
|
||||
static const int maxShortLogLength = 120;
|
||||
|
||||
QString GitClient::synchronousShortDescription(const QString &workingDirectory, const QString &revision)
|
||||
{
|
||||
// Short SHA 1, author, subject
|
||||
return synchronousShortDescription(workingDirectory, revision,
|
||||
QLatin1String(defaultShortLogFormatC));
|
||||
QString output = synchronousShortDescription(workingDirectory, revision,
|
||||
QLatin1String(defaultShortLogFormatC));
|
||||
if (output.length() > maxShortLogLength) {
|
||||
output.truncate(maxShortLogLength);
|
||||
output.append(QLatin1String("..."));
|
||||
}
|
||||
output.append(QLatin1String("\")"));
|
||||
return output;
|
||||
}
|
||||
|
||||
static inline QString msgCannotDetermineBranch(const QString &workingDirectory, const QString &why)
|
||||
|
||||
Reference in New Issue
Block a user