diff --git a/src/plugins/git/gitclient.cpp b/src/plugins/git/gitclient.cpp index 4d106e2ebd2af3a7bc3ece6f8966fff352f6ddd2..90bd390e27fb12dee9073ed4dd1c68cdf2ca7448 100644 --- a/src/plugins/git/gitclient.cpp +++ b/src/plugins/git/gitclient.cpp @@ -1732,10 +1732,23 @@ void GitClient::continuePreviousGitCommand(const QString &workingDirectory, synchronousAbortCommand(workingDirectory, gitCommand); break; default: // Continue/Skip - if (isRebase) - synchronousCommandContinue(workingDirectory, gitCommand, hasChanges); - else + if (isRebase) { + // Git might request an editor, so this must be done asynchronously + // and without timeout + QStringList arguments; + arguments << gitCommand << QLatin1String(hasChanges ? "--continue" : "--skip"); + outputWindow()->appendCommand(workingDirectory, + settings()->stringValue(GitSettings::binaryPathKey), + arguments); + VcsBase::Command *command = createCommand(workingDirectory, 0, true); + command->addJob(arguments, -1); + command->execute(); + ConflictHandler *handler = new ConflictHandler(command, workingDirectory, gitCommand); + connect(command, SIGNAL(outputData(QByteArray)), handler, SLOT(readStdOut(QByteArray))); + connect(command, SIGNAL(errorText(QString)), handler, SLOT(readStdErr(QString))); + } else { GitPlugin::instance()->startCommit(); + } } } @@ -2218,13 +2231,6 @@ bool GitClient::synchronousPull(const QString &workingDirectory, bool rebase) return executeAndHandleConflicts(workingDirectory, arguments, abortCommand); } -bool GitClient::synchronousCommandContinue(const QString &workingDirectory, const QString &command, bool hasChanges) -{ - QStringList arguments; - arguments << command << QLatin1String(hasChanges ? "--continue" : "--skip"); - return executeAndHandleConflicts(workingDirectory, arguments, command); -} - void GitClient::synchronousAbortCommand(const QString &workingDir, const QString &abortCommand) { // Abort to clean if something goes wrong diff --git a/src/plugins/git/gitclient.h b/src/plugins/git/gitclient.h index a45452be289f821f0e53a0da73c82fe87886eacb..59dd9bb3af501f34f15fd7ce77fb65ebb9f093f4 100644 --- a/src/plugins/git/gitclient.h +++ b/src/plugins/git/gitclient.h @@ -197,7 +197,6 @@ public: QString vcsGetRepositoryURL(const QString &directory); bool synchronousFetch(const QString &workingDirectory, const QString &remote); bool synchronousPull(const QString &workingDirectory, bool rebase); - bool synchronousCommandContinue(const QString &workingDirectory, const QString &command, bool hasChanges); bool synchronousPush(const QString &workingDirectory, const QString &remote = QString()); bool synchronousMerge(const QString &workingDirectory, const QString &branch); bool synchronousRebase(const QString &workingDirectory,