forked from qt-creator/qt-creator
Git: Fix progress during rebase
Broke by c4b5048836
.
Change-Id: I35b22b6ab5fd8767ef729906b8344a0d6aa1f0cf
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
This commit is contained in:
committed by
Orgad Shaneh
parent
e20aa431ed
commit
84b57027c8
@@ -2863,8 +2863,7 @@ bool GitClient::canRebase(const QString &workingDirectory) const
|
||||
|
||||
void GitClient::rebase(const QString &workingDirectory, const QString &argument)
|
||||
{
|
||||
VcsCommand *command = vcsExecAbortable(workingDirectory, {"rebase", argument});
|
||||
GitProgressParser::attachToCommand(command);
|
||||
vcsExecAbortable(workingDirectory, {"rebase", argument}, true);
|
||||
}
|
||||
|
||||
void GitClient::cherryPick(const QString &workingDirectory, const QString &argument)
|
||||
@@ -2880,7 +2879,8 @@ void GitClient::revert(const QString &workingDirectory, const QString &argument)
|
||||
// Executes a command asynchronously. Work tree is expected to be clean.
|
||||
// Stashing is handled prior to this call.
|
||||
VcsCommand *GitClient::vcsExecAbortable(const QString &workingDirectory,
|
||||
const QStringList &arguments)
|
||||
const QStringList &arguments,
|
||||
bool createProgressParser)
|
||||
{
|
||||
QTC_ASSERT(!arguments.isEmpty(), return nullptr);
|
||||
|
||||
@@ -2890,8 +2890,10 @@ VcsCommand *GitClient::vcsExecAbortable(const QString &workingDirectory,
|
||||
command->setCookie(workingDirectory);
|
||||
command->addFlags(VcsCommand::ShowSuccessMessage);
|
||||
command->addJob(vcsBinary(), arguments, 0);
|
||||
command->execute();
|
||||
ConflictHandler::attachToCommand(command, abortCommand);
|
||||
if (createProgressParser)
|
||||
GitProgressParser::attachToCommand(command);
|
||||
command->execute();
|
||||
|
||||
return command;
|
||||
}
|
||||
@@ -2929,8 +2931,7 @@ void GitClient::interactiveRebase(const QString &workingDirectory, const QString
|
||||
arguments << commit + '^';
|
||||
if (fixup)
|
||||
m_disableEditor = true;
|
||||
VcsCommand *command = vcsExecAbortable(workingDirectory, arguments);
|
||||
GitProgressParser::attachToCommand(command);
|
||||
vcsExecAbortable(workingDirectory, arguments, true);
|
||||
if (fixup)
|
||||
m_disableEditor = false;
|
||||
}
|
||||
|
@@ -124,7 +124,9 @@ public:
|
||||
Utils::FileName vcsBinary() const override;
|
||||
unsigned gitVersion(QString *errorMessage = nullptr) const;
|
||||
|
||||
VcsBase::VcsCommand *vcsExecAbortable(const QString &workingDirectory, const QStringList &arguments);
|
||||
VcsBase::VcsCommand *vcsExecAbortable(const QString &workingDirectory,
|
||||
const QStringList &arguments,
|
||||
bool createProgressParser = false);
|
||||
|
||||
QString findRepositoryForDirectory(const QString &dir) const;
|
||||
QString findGitDirForRepository(const QString &repositoryDir) const;
|
||||
|
Reference in New Issue
Block a user