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

View File

@@ -888,8 +888,7 @@ void GitPlugin::pull()
switch (stashResult) {
case GitClient::StashUnchanged:
case GitClient::Stashed:
m_gitClient->synchronousPull(state.topLevel(), rebase);
if (stashResult == GitClient::Stashed)
if (m_gitClient->synchronousPull(state.topLevel(), rebase) && (stashResult == GitClient::Stashed))
m_gitClient->stashPop(state.topLevel());
break;
case GitClient::NotStashed: