Git: Enable Show for file in a specified revision

Fixes: QTCREATORBUG-24689
Change-Id: Ic4ceb1c59f39009c28be7f34ee62f65fd41506c1
Reviewed-by: André Hartmann <aha_1980@gmx.de>
This commit is contained in:
Orgad Shaneh
2020-09-25 17:24:51 +03:00
committed by Orgad Shaneh
parent 91d3800ec3
commit eb6a2f2b89
5 changed files with 64 additions and 28 deletions

View File

@@ -1220,7 +1220,13 @@ void GitPluginPrivate::startChangeRelatedAction(const Id &id)
return;
if (dialog.command() == Show) {
m_gitClient.show(workingDirectory, change);
const int colon = change.indexOf(':');
if (colon > 0) {
const QString path = QDir(workingDirectory).absoluteFilePath(change.mid(colon + 1));
m_gitClient.openShowEditor(workingDirectory, change.left(colon), path);
} else {
m_gitClient.show(workingDirectory, change);
}
return;
}