forked from qt-creator/qt-creator
Fixes: Add ensureStashed() method asking user to stash before a change such as pull
This commit is contained in:
@@ -703,8 +703,17 @@ bool GitPlugin::editorAboutToClose(Core::IEditor *iEditor)
|
||||
void GitPlugin::pull()
|
||||
{
|
||||
const QString workingDirectory = getWorkingDirectory();
|
||||
if (!workingDirectory.isEmpty())
|
||||
m_gitClient->pull(workingDirectory);
|
||||
if (workingDirectory.isEmpty())
|
||||
return;
|
||||
|
||||
switch (m_gitClient->ensureStash(workingDirectory)) {
|
||||
case GitClient::StashUnchanged:
|
||||
case GitClient::Stashed:
|
||||
case GitClient::NotStashed:
|
||||
m_gitClient->pull(workingDirectory);
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void GitPlugin::push()
|
||||
|
||||
Reference in New Issue
Block a user