forked from qt-creator/qt-creator
Git: Use log instead of show to display commit without diff
Change-Id: I12ff53e3375470704fb6aafa6ec0a3eaadd9aadb Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
This commit is contained in:
committed by
Orgad Shaneh
parent
228851d822
commit
1686e314bd
@@ -621,12 +621,10 @@ QString BranchModel::toolTip(const QString &sha) const
|
||||
// Show the sha description excluding diff as toolTip
|
||||
QString output;
|
||||
QString errorMessage;
|
||||
if (!m_client->synchronousShow(m_workingDirectory, sha, &output, &errorMessage))
|
||||
QStringList arguments(QLatin1String("-n1"));
|
||||
arguments << sha;
|
||||
if (!m_client->synchronousLog(m_workingDirectory, arguments, &output, &errorMessage))
|
||||
return errorMessage;
|
||||
// Remove 'diff' output
|
||||
const int diffPos = output.indexOf(QLatin1String("\ndiff --"));
|
||||
if (diffPos != -1)
|
||||
output.remove(diffPos, output.size() - diffPos);
|
||||
return output;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user