summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorOrgad Shaneh <orgad.shaneh@audiocodes.com>2013-12-05 09:16:26 +0200
committerOrgad Shaneh <orgads@gmail.com>2013-12-05 12:34:42 +0100
commit4845dc77eea56c8df6739da7efdfa5c665efd481 (patch)
tree78111120842446c5cc12ae080719b5ae321c6eee /src
parent072d551c73874fc5ba9b9137af511716fd4bd7f5 (diff)
downloadqt-creator-4845dc77eea56c8df6739da7efdfa5c665efd481.tar.gz
Git: Wait with stashing on interactive rebase until user approves
Change-Id: Ieb8d0cd0906cdf0ea7a37e60e92a263c359c7a41 Reviewed-by: Petar Perisin <petar.perisin@gmail.com>
Diffstat (limited to 'src')
-rw-r--r--src/plugins/git/gitplugin.cpp8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/plugins/git/gitplugin.cpp b/src/plugins/git/gitplugin.cpp
index c6b5cf02bb..ae52a8a085 100644
--- a/src/plugins/git/gitplugin.cpp
+++ b/src/plugins/git/gitplugin.cpp
@@ -854,15 +854,13 @@ void GitPlugin::startRebase()
const QString topLevel = state.topLevel();
if (topLevel.isEmpty() || !m_gitClient->canRebase(topLevel))
return;
- if (!m_gitClient->beginStashScope(topLevel, QLatin1String("Rebase-i")))
- return;
LogChangeDialog dialog(false, Core::ICore::mainWindow());
RebaseItemDelegate delegate(dialog.widget());
dialog.setWindowTitle(tr("Interactive Rebase"));
- if (dialog.runDialog(topLevel, QString(), false))
+ if (!dialog.runDialog(topLevel, QString(), false))
+ return;
+ if (m_gitClient->beginStashScope(topLevel, QLatin1String("Rebase-i")))
m_gitClient->interactiveRebase(topLevel, dialog.commit(), false);
- else
- m_gitClient->endStashScope(topLevel);
}
void GitPlugin::startChangeRelatedAction()