Commit c68adbf9 authored by Orgad Shaneh's avatar Orgad Shaneh Committed by Orgad Shaneh
Browse files

Git: Enable skipping a commit on rebase



Change-Id: Ib83ca453c86b93cb359a2a0a9774c7d39533be4e
Reviewed-by: default avatarTobias Hunger <tobias.hunger@digia.com>
parent bf618583
...@@ -73,6 +73,7 @@ ...@@ -73,6 +73,7 @@
#include <QComboBox> #include <QComboBox>
#include <QMessageBox> #include <QMessageBox>
#include <QPushButton>
#include <QToolButton> #include <QToolButton>
#include <QTextCodec> #include <QTextCodec>
...@@ -2163,16 +2164,23 @@ void GitClient::handleMergeConflicts(const QString &workingDir, const QString &c ...@@ -2163,16 +2164,23 @@ void GitClient::handleMergeConflicts(const QString &workingDir, const QString &c
: tr("Conflicts detected with commit %1").arg(commit); : tr("Conflicts detected with commit %1").arg(commit);
QMessageBox mergeOrAbort(QMessageBox::Question, tr("Conflicts Detected"), QMessageBox mergeOrAbort(QMessageBox::Question, tr("Conflicts Detected"),
message, QMessageBox::Ignore | QMessageBox::Abort); message, QMessageBox::Ignore | QMessageBox::Abort);
mergeOrAbort.addButton(tr("Run Merge Tool"), QMessageBox::ActionRole); QPushButton *mergeToolButton = mergeOrAbort.addButton(tr("Run &Merge Tool"),
QMessageBox::ActionRole);
if (abortCommand == QLatin1String("rebase"))
mergeOrAbort.addButton(tr("&Skip"), QMessageBox::ActionRole);
switch (mergeOrAbort.exec()) { switch (mergeOrAbort.exec()) {
case QMessageBox::Abort: { case QMessageBox::Abort:
synchronousAbortCommand(workingDir, abortCommand); synchronousAbortCommand(workingDir, abortCommand);
break; break;
}
case QMessageBox::Ignore: case QMessageBox::Ignore:
break; break;
default: // Merge default: // Merge or Skip
merge(workingDir); if (mergeOrAbort.clickedButton() == mergeToolButton) {
merge(workingDir);
} else {
QStringList arguments = QStringList() << abortCommand << QLatin1String("--skip");
executeAndHandleConflicts(workingDir, arguments, abortCommand);
}
} }
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment