forked from qt-creator/qt-creator
Git: If stashed before pull, stash pop after it
Change-Id: Ie983df1ffadac27551bbc51199784c0bc8610c14 Reviewed-by: Tobias Hunger <tobias.hunger@nokia.com>
This commit is contained in:
committed by
Tobias Hunger
parent
616cb86ea7
commit
ad7874ed87
@@ -787,10 +787,13 @@ void GitPlugin::pull()
|
|||||||
QTC_ASSERT(state.hasTopLevel(), return);
|
QTC_ASSERT(state.hasTopLevel(), return);
|
||||||
const bool rebase = m_gitClient->settings()->boolValue(GitSettings::pullRebaseKey);
|
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::StashUnchanged:
|
||||||
case GitClient::Stashed:
|
case GitClient::Stashed:
|
||||||
m_gitClient->synchronousPull(state.topLevel(), rebase);
|
m_gitClient->synchronousPull(state.topLevel(), rebase);
|
||||||
|
if (stashResult == GitClient::Stashed)
|
||||||
|
m_gitClient->stashPop(state.topLevel());
|
||||||
break;
|
break;
|
||||||
case GitClient::NotStashed:
|
case GitClient::NotStashed:
|
||||||
if (!rebase)
|
if (!rebase)
|
||||||
|
Reference in New Issue
Block a user