Commit 86c2342e authored by Orgad Shaneh's avatar Orgad Shaneh Committed by Tobias Hunger

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

Change-Id: Ib999f8f00b065e4e51b70f1c5f81bdd17baabd8c
Reviewed-by: default avatarTobias Hunger <tobias.hunger@digia.com>
parent 4d18710f
...@@ -192,7 +192,7 @@ void GitEditor::setPlainTextDataFiltered(const QByteArray &a) ...@@ -192,7 +192,7 @@ void GitEditor::setPlainTextDataFiltered(const QByteArray &a)
} }
case VcsBase::DiffOutput: { case VcsBase::DiffOutput: {
const QFileInfo fi(source()); const QFileInfo fi(source());
const QString workingDirectory = fi.absolutePath(); const QString workingDirectory = fi.isDir() ? fi.absoluteFilePath() : fi.absolutePath();
QByteArray precedes, follows; QByteArray precedes, follows;
if (array.startsWith("commit ")) { // show if (array.startsWith("commit ")) { // show
int lastHeaderLine = array.indexOf("\n\n") + 1; int lastHeaderLine = array.indexOf("\n\n") + 1;
......
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