forked from qt-creator/qt-creator
Git: Replace synchronousStash with ensureStash
When flags are not used. syncStash doesn't return result, which can be useful for StashGuard Change-Id: I1327b5d8d10410e7a3b9fdb07a03b476d5abcdc4 Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
This commit is contained in:
committed by
Orgad Shaneh
parent
8b67ae7395
commit
89d16332d1
@@ -188,7 +188,7 @@ void BranchDialog::checkout()
|
||||
QString stashMessage;
|
||||
if (branchCheckoutDialog.makeStashOfCurrentBranch()
|
||||
|| branchCheckoutDialog.moveLocalChangesToNextBranch()) {
|
||||
stashMessage = gitClient->synchronousStash(m_repository, currentBranch + QLatin1String("-AutoStash"));
|
||||
gitClient->ensureStash(m_repository, currentBranch + QLatin1String("-AutoStash"), false, &stashMessage);
|
||||
} else if (branchCheckoutDialog.discardLocalChanges()) {
|
||||
gitClient->synchronousReset(m_repository);
|
||||
}
|
||||
@@ -259,7 +259,7 @@ void BranchDialog::merge()
|
||||
QString stashMessage;
|
||||
|
||||
if (gitClient->gitStatus(m_repository, StatusMode(NoUntracked | NoSubmodules)) == GitClient::StatusChanged)
|
||||
stashMessage = gitClient->synchronousStash(m_repository, QLatin1String("merge"));
|
||||
gitClient->ensureStash(m_repository, QLatin1String("merge"), false, &stashMessage);
|
||||
|
||||
if (gitClient->synchronousMerge(m_repository, branch) && (!stashMessage.isEmpty()))
|
||||
gitClient->stashPop(m_repository);
|
||||
@@ -276,7 +276,7 @@ void BranchDialog::rebase()
|
||||
QString stashMessage;
|
||||
|
||||
if (gitClient->gitStatus(m_repository, StatusMode(NoUntracked | NoSubmodules)) == GitClient::StatusChanged)
|
||||
stashMessage = gitClient->synchronousStash(m_repository, QLatin1String("rebase"));
|
||||
gitClient->ensureStash(m_repository, QLatin1String("rebase"), false, &stashMessage);
|
||||
|
||||
if (gitClient->synchronousRebase(m_repository, baseBranch) && (!stashMessage.isEmpty()))
|
||||
gitClient->stashPop(m_repository);
|
||||
|
||||
Reference in New Issue
Block a user