forked from qt-creator/qt-creator
Git: Do not pull --rebase when changes are not stashed
Git will not do a pull --rebase when there are changes. So we now abort if the user did not stash them instead of trying to pull. I do not want to revert user changes implicitly. Task-number: QTCREATORBUG-7031 Change-Id: Ic6041755938be36d8ecdbcbac373b5c38642360d Reviewed-by: Tobias Hunger <tobias.hunger@nokia.com>
This commit is contained in:
@@ -794,12 +794,17 @@ void GitPlugin::pull()
|
||||
{
|
||||
const VcsBase::VcsBasePluginState state = currentState();
|
||||
QTC_ASSERT(state.hasTopLevel(), return);
|
||||
const bool rebase = m_gitClient->settings()->boolValue(GitSettings::pullRebaseKey);
|
||||
|
||||
switch (m_gitClient->ensureStash(state.topLevel())) {
|
||||
case GitClient::StashUnchanged:
|
||||
case GitClient::Stashed:
|
||||
m_gitClient->synchronousPull(state.topLevel(), rebase);
|
||||
break;
|
||||
case GitClient::NotStashed:
|
||||
m_gitClient->synchronousPull(state.topLevel());
|
||||
if (!rebase)
|
||||
m_gitClient->synchronousPull(state.topLevel(), false);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
Reference in New Issue
Block a user