forked from qt-creator/qt-creator
Git: Correctly handle aborting pull commands
For example, aborting a "git pull --rebase" command did not work, because the old code tried to run "git pull --abort" instead of "git rebase --abort". As side effect, this patch also enables the Skip commit button in handleMergeConflicts(), that was not shown before. Change-Id: Ifa43a4ba0199c97fdf8a361eb9e0207704d93e26 Reviewed-by: Orgad Shaneh <orgads@gmail.com>
This commit is contained in:
committed by
André Hartmann
parent
9aef0c2ad3
commit
b950936d45
@@ -2890,7 +2890,7 @@ void GitClient::pull(const QString &workingDirectory, bool rebase)
|
||||
abortCommand = "merge";
|
||||
}
|
||||
|
||||
VcsCommand *command = vcsExecAbortable(workingDirectory, arguments, rebase);
|
||||
VcsCommand *command = vcsExecAbortable(workingDirectory, arguments, rebase, abortCommand);
|
||||
connect(command, &VcsCommand::success, this,
|
||||
[this, workingDirectory] { updateSubmodulesIfNeeded(workingDirectory, true); },
|
||||
Qt::QueuedConnection);
|
||||
@@ -3092,11 +3092,13 @@ void GitClient::revert(const QString &workingDirectory, const QString &argument)
|
||||
// Stashing is handled prior to this call.
|
||||
VcsCommand *GitClient::vcsExecAbortable(const QString &workingDirectory,
|
||||
const QStringList &arguments,
|
||||
bool isRebase)
|
||||
bool isRebase,
|
||||
QString abortCommand)
|
||||
{
|
||||
QTC_ASSERT(!arguments.isEmpty(), return nullptr);
|
||||
|
||||
QString abortCommand = arguments.at(0);
|
||||
if (abortCommand.isEmpty())
|
||||
abortCommand = arguments.at(0);
|
||||
VcsCommand *command = createCommand(workingDirectory, nullptr, VcsWindowOutputBind);
|
||||
command->setCookie(workingDirectory);
|
||||
command->addFlags(VcsCommand::SshPasswordPrompt
|
||||
|
||||
Reference in New Issue
Block a user