Git: Start interactive rebase from log window

Useful if local changes are already pushed to a
remote and therefore Creator refuses interactive
rebase due to missing local commits.

Task-number: QTCREATORBUG-11200
Change-Id: I2e9b9fd35b75fcb232c1358c553fe1092ce97161
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
This commit is contained in:
Andre Hartmann
2019-04-17 11:04:49 +02:00
committed by André Hartmann
parent cb8da0e93b
commit d2d05c584e
3 changed files with 25 additions and 9 deletions

View File

@@ -303,6 +303,10 @@ void GitEditorWidget::addChangeActions(QMenu *menu, const QString &change)
menu->addAction(tr("C&heckout Change %1").arg(change), this, [this] {
GitPlugin::client()->checkout(sourceWorkingDirectory(), m_currentChange);
});
connect(menu->addAction(tr("&Interactive Rebase from Change %1...").arg(change)),
&QAction::triggered, this, [this] {
GitPlugin::instance()->startRebaseFromCommit(sourceWorkingDirectory(), m_currentChange);
});
menu->addAction(tr("&Log for Change %1").arg(change), this, [this] {
GitPlugin::client()->log(sourceWorkingDirectory(), QString(), false, {m_currentChange});
});