Git: Fix Precedes/Follows display for show opened from log

Change-Id: Ib999f8f00b065e4e51b70f1c5f81bdd17baabd8c
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
This commit is contained in:
Orgad Shaneh
2013-04-28 21:05:02 +03:00
committed by Tobias Hunger
parent 4d18710f46
commit 86c2342ed2

View File

@@ -192,7 +192,7 @@ void GitEditor::setPlainTextDataFiltered(const QByteArray &a)
}
case VcsBase::DiffOutput: {
const QFileInfo fi(source());
const QString workingDirectory = fi.absolutePath();
const QString workingDirectory = fi.isDir() ? fi.absoluteFilePath() : fi.absolutePath();
QByteArray precedes, follows;
if (array.startsWith("commit ")) { // show
int lastHeaderLine = array.indexOf("\n\n") + 1;