Git: Only stash pop if pull succeeds

Change-Id: I7861d862fdd3d24201e39bb4c7a9cb91643acc35
Reviewed-by: Petar Perisin <petar.perisin@gmail.com>
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
This commit is contained in:
Orgad Shaneh
2012-12-25 11:00:54 +02:00
parent aed53a70ee
commit 60129c40ef
+1 -2
View File
@@ -888,8 +888,7 @@ void GitPlugin::pull()
switch (stashResult) { switch (stashResult) {
case GitClient::StashUnchanged: case GitClient::StashUnchanged:
case GitClient::Stashed: case GitClient::Stashed:
m_gitClient->synchronousPull(state.topLevel(), rebase); if (m_gitClient->synchronousPull(state.topLevel(), rebase) && (stashResult == GitClient::Stashed))
if (stashResult == GitClient::Stashed)
m_gitClient->stashPop(state.topLevel()); m_gitClient->stashPop(state.topLevel());
break; break;
case GitClient::NotStashed: case GitClient::NotStashed: