forked from qt-creator/qt-creator
VCS: Resolve symlinks on blame
Fixes: QTCREATORBUG-20792 Change-Id: I60ac64957b23b80826c93ba73ff17a265549811f Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
This commit is contained in:
committed by
Orgad Shaneh
parent
46df40a919
commit
424fd7c557
@@ -1055,8 +1055,12 @@ void GitPluginPrivate::blameFile()
|
||||
}
|
||||
}
|
||||
}
|
||||
VcsBaseEditorWidget *editor = m_gitClient.annotate(state.currentFileTopLevel(),
|
||||
state.relativeCurrentFile(), {}, lineNumber, extraOptions);
|
||||
const FilePath fileName = FilePath::fromString(state.currentFile()).canonicalPath();
|
||||
FilePath topLevel;
|
||||
VcsManager::findVersionControlForDirectory(fileName.parentDir(), &topLevel);
|
||||
VcsBaseEditorWidget *editor = m_gitClient.annotate(
|
||||
topLevel, fileName.relativeChildPath(topLevel).toString(),
|
||||
{}, lineNumber, extraOptions);
|
||||
if (firstLine > 0)
|
||||
editor->setFirstLineNumber(firstLine);
|
||||
}
|
||||
|
@@ -1450,9 +1450,9 @@ void VcsBaseEditorWidget::addDiffActions(QMenu *, const DiffChunk &)
|
||||
void VcsBaseEditorWidget::slotAnnotateRevision(const QString &change)
|
||||
{
|
||||
const int currentLine = textCursor().blockNumber() + 1;
|
||||
const FilePath fileName = FilePath::fromString(fileNameForLine(currentLine));
|
||||
const FilePath fileName = FilePath::fromString(fileNameForLine(currentLine)).canonicalPath();
|
||||
const FilePath workingDirectory = d->m_workingDirectory.isEmpty()
|
||||
? fileName.absolutePath()
|
||||
? VcsManager::findTopLevelForDirectory(fileName.parentDir())
|
||||
: d->m_workingDirectory;
|
||||
emit annotateRevisionRequested(workingDirectory,
|
||||
fileName.relativeChildPath(workingDirectory).toString(),
|
||||
|
Reference in New Issue
Block a user