forked from qt-creator/qt-creator
Git: Avoid running wish if git/cmd is in PATH
It always fails and falls back to git/bin Change-Id: I367ff33c864adebf438cbcc00332520ec6e0d454 Reviewed-by: Petar Perisin <petar.perisin@gmail.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
This commit is contained in:
committed by
Orgad Shaneh
parent
d08af15002
commit
af1cc6831c
@@ -1716,15 +1716,15 @@ bool GitClient::tryLauchingGitK(const QProcessEnvironment &env,
|
||||
const QString &gitBinDirectory,
|
||||
bool silent)
|
||||
{
|
||||
QString binary;
|
||||
QString binary = gitBinDirectory + QLatin1String("/gitk");
|
||||
QStringList arguments;
|
||||
if (Utils::HostOsInfo::isWindowsHost()) {
|
||||
// Launch 'wish' shell from git binary directory with the gitk located there
|
||||
binary = gitBinDirectory + QLatin1String("/wish");
|
||||
arguments << (gitBinDirectory + QLatin1String("/gitk"));
|
||||
} else {
|
||||
// Simple: Run gitk from binary path
|
||||
binary = gitBinDirectory + QLatin1String("/gitk");
|
||||
// If git/bin is in path, use 'wish' shell to run. Otherwise (git/cmd), directly run gitk
|
||||
QString wish = gitBinDirectory + QLatin1String("/wish");
|
||||
if (QFileInfo(wish + QLatin1String(".exe")).exists()) {
|
||||
arguments << binary;
|
||||
binary = wish;
|
||||
}
|
||||
}
|
||||
VcsBase::VcsBaseOutputWindow *outwin = VcsBase::VcsBaseOutputWindow::instance();
|
||||
const QString gitkOpts = settings()->stringValue(GitSettings::gitkOptionsKey);
|
||||
|
||||
Reference in New Issue
Block a user