From bd7499b896359ff70f26dbf183ea99f6990bfa11 Mon Sep 17 00:00:00 2001 From: Orgad Shaneh <orgads@gmail.com> Date: Thu, 19 Jul 2012 22:44:28 +0300 Subject: [PATCH] Git: Do not append formatting when log failed Happens for 00000000 for example Change-Id: I1ab3157dd87744a4b16284d91dd26f42898965e9 Reviewed-by: Tobias Hunger <tobias.hunger@nokia.com> --- src/plugins/git/gitclient.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/plugins/git/gitclient.cpp b/src/plugins/git/gitclient.cpp index ca785e34486..5d0fe572578 100644 --- a/src/plugins/git/gitclient.cpp +++ b/src/plugins/git/gitclient.cpp @@ -1076,11 +1076,13 @@ QString GitClient::synchronousShortDescription(const QString &workingDirectory, // Short SHA 1, author, subject QString output = synchronousShortDescription(workingDirectory, revision, QLatin1String(defaultShortLogFormatC)); - if (output.length() > maxShortLogLength) { - output.truncate(maxShortLogLength); - output.append(QLatin1String("...")); + if (output != revision) { + if (output.length() > maxShortLogLength) { + output.truncate(maxShortLogLength); + output.append(QLatin1String("...")); + } + output.append(QLatin1String("\")")); } - output.append(QLatin1String("\")")); return output; } -- GitLab