Fixes: Add ensureStashed() method asking user to stash before a change such as pull

This commit is contained in:
Friedemann Kleint
2008-12-19 11:45:30 +01:00
parent d6fbb1b573
commit 4db2f99836
4 changed files with 90 additions and 15 deletions

View File

@@ -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()