Commit 960bfeb4 authored by Orgad Shaneh's avatar Orgad Shaneh Committed by Tobias Hunger

Git: Limit length for revisions displayed in context menu

Change-Id: I335b49ed9af9c3f2ae083a03e4109173b3783f76
Reviewed-by: default avatarTobias Hunger <tobias.hunger@nokia.com>
parent 0fb6aafd
......@@ -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)
......
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