Git: Simplify stash

Change-Id: I2df6687d2bc539aa192dff53b4fb7936f20d299f
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
This commit is contained in:
Orgad Shaneh
2015-02-04 20:48:47 +02:00
committed by Orgad Shaneh
parent 4f079fe17e
commit 15e7446fda

View File

@@ -1267,11 +1267,10 @@ void GitPlugin::stash()
const VcsBasePluginState state = currentState(); const VcsBasePluginState state = currentState();
QTC_ASSERT(state.hasTopLevel(), return); QTC_ASSERT(state.hasTopLevel(), return);
QString topLevel = state.topLevel(); const QString topLevel = state.topLevel();
if (!m_gitClient->beginStashScope(topLevel, QString(), NoPrompt)) m_gitClient->executeSynchronousStash(topLevel);
return; if (m_stashDialog)
if (m_gitClient->stashInfo(topLevel).result() == GitClient::StashInfo::Stashed && m_stashDialog) m_stashDialog->refresh(topLevel, true);
m_stashDialog->refresh(state.topLevel(), true);
} }
void GitPlugin::stashSnapshot() void GitPlugin::stashSnapshot()