forked from qt-creator/qt-creator
Git: fix bug with Log and Blame not showing stuff correctly.
Task-number: QTCREATORBUG-9375 Change-Id: I4e18e4c2d4db71392aa305d49ffce924f8451a0b Reviewed-by: Orgad Shaneh <orgads@gmail.com>
This commit is contained in:
committed by
Orgad Shaneh
parent
f8b052188f
commit
55e087ab05
@@ -1138,6 +1138,8 @@ void GitClient::show(const QString &source, const QString &id,
|
|||||||
}
|
}
|
||||||
|
|
||||||
QString title = tr("Git Show \"%1\"").arg(name.isEmpty() ? id : name);
|
QString title = tr("Git Show \"%1\"").arg(name.isEmpty() ? id : name);
|
||||||
|
const QFileInfo sourceFi(source);
|
||||||
|
const QString workDir = sourceFi.isDir() ? sourceFi.absoluteFilePath() : sourceFi.absolutePath();
|
||||||
if (settings()->boolValue(GitSettings::useDiffEditorKey)) {
|
if (settings()->boolValue(GitSettings::useDiffEditorKey)) {
|
||||||
const Core::Id editorId = DiffEditor::Constants::DIFF_EDITOR_ID;
|
const Core::Id editorId = DiffEditor::Constants::DIFF_EDITOR_ID;
|
||||||
|
|
||||||
@@ -1151,7 +1153,9 @@ void GitClient::show(const QString &source, const QString &id,
|
|||||||
}
|
}
|
||||||
|
|
||||||
int timeout = settings()->intValue(GitSettings::timeoutKey);
|
int timeout = settings()->intValue(GitSettings::timeoutKey);
|
||||||
GitDiffHandler *handler = new GitDiffHandler(editorEditable, gitBinaryPath(), source, processEnvironment(), timeout);
|
GitDiffHandler *handler = new GitDiffHandler(editorEditable, gitBinaryPath(),
|
||||||
|
findRepositoryForDirectory(workDir),
|
||||||
|
processEnvironment(), timeout);
|
||||||
handler->show(id);
|
handler->show(id);
|
||||||
} else {
|
} else {
|
||||||
const Core::Id editorId = Git::Constants::GIT_DIFF_EDITOR_ID;
|
const Core::Id editorId = Git::Constants::GIT_DIFF_EDITOR_ID;
|
||||||
@@ -1169,8 +1173,6 @@ void GitClient::show(const QString &source, const QString &id,
|
|||||||
arguments.append(userArgs);
|
arguments.append(userArgs);
|
||||||
arguments << id;
|
arguments << id;
|
||||||
|
|
||||||
const QFileInfo sourceFi(source);
|
|
||||||
const QString workDir = sourceFi.isDir() ? sourceFi.absoluteFilePath() : sourceFi.absolutePath();
|
|
||||||
editor->setDiffBaseDirectory(workDir);
|
editor->setDiffBaseDirectory(workDir);
|
||||||
executeGit(workDir, arguments, editor);
|
executeGit(workDir, arguments, editor);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user