Git: Disable merge tool execution for vimdiff

vimdiff requires a terminal, which is not supported in Qt Creator.

Fixes: QTCREATORBUG-21147
Change-Id: I6168ac9c4a03061a64a1699fca6f39c90df5168b
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
This commit is contained in:
Orgad Shaneh
2018-10-10 23:48:51 +03:00
committed by Orgad Shaneh
parent 4c055491ef
commit 4c27b0e6e7

View File

@@ -2944,6 +2944,12 @@ void GitClient::handleMergeConflicts(const QString &workingDir, const QString &c
QMessageBox::NoButton, ICore::mainWindow());
QPushButton *mergeToolButton = mergeOrAbort.addButton(tr("Run &Merge Tool"),
QMessageBox::AcceptRole);
const QString mergeTool = readConfigValue(workingDir, "merge.tool");
if (mergeTool.isEmpty() || mergeTool.startsWith("vimdiff")) {
mergeToolButton->setEnabled(false);
mergeToolButton->setToolTip(tr("Only graphical merge tools are supported. "
"Please configure merge.tool."));
}
mergeOrAbort.addButton(QMessageBox::Ignore);
if (abortCommand == "rebase")
mergeOrAbort.addButton(tr("&Skip"), QMessageBox::RejectRole);