From ad7874ed87d186a3ffd1a5c4a85651c2927d5650 Mon Sep 17 00:00:00 2001 From: Orgad Shaneh Date: Mon, 25 Jun 2012 14:46:15 +0300 Subject: [PATCH] Git: If stashed before pull, stash pop after it Change-Id: Ie983df1ffadac27551bbc51199784c0bc8610c14 Reviewed-by: Tobias Hunger --- src/plugins/git/gitplugin.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/plugins/git/gitplugin.cpp b/src/plugins/git/gitplugin.cpp index a75ed1ff83c..c211030ec12 100644 --- a/src/plugins/git/gitplugin.cpp +++ b/src/plugins/git/gitplugin.cpp @@ -787,10 +787,13 @@ void GitPlugin::pull() QTC_ASSERT(state.hasTopLevel(), return); const bool rebase = m_gitClient->settings()->boolValue(GitSettings::pullRebaseKey); - switch (m_gitClient->ensureStash(state.topLevel())) { + GitClient::StashResult stashResult = m_gitClient->ensureStash(state.topLevel()); + switch (stashResult) { case GitClient::StashUnchanged: case GitClient::Stashed: m_gitClient->synchronousPull(state.topLevel(), rebase); + if (stashResult == GitClient::Stashed) + m_gitClient->stashPop(state.topLevel()); break; case GitClient::NotStashed: if (!rebase)