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:
Tobias Hunger
2012-03-05 10:07:30 +01:00
parent d48136f312
commit 8973ef31cc
2 changed files with 7 additions and 2 deletions

View File

@@ -170,6 +170,7 @@ public:
QString vcsGetRepositoryURL(const QString &directory);
bool synchronousFetch(const QString &workingDirectory, const QString &remote);
bool synchronousPull(const QString &workingDirectory);
bool synchronousPull(const QString &workingDirectory, bool rebase);
bool synchronousPush(const QString &workingDirectory, const QString &remote = QString());
// git svn support (asynchronous).
@@ -282,7 +283,6 @@ private:
QString *errorMessage,
bool revertStaging);
void connectRepositoryChanged(const QString & repository, VcsBase::Command *cmd);
bool synchronousPull(const QString &workingDirectory, bool rebase);
void syncAbortPullRebase(const QString &workingDir);
bool tryLauchingGitK(const QProcessEnvironment &env,
const QString &workingDirectory,