Git - move ensureStash inside StashGuard

this is where stash popup question belongs

Change-Id: Ib3435f12eacd0b932ba2a67ecd728e5a41c0c64a
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
This commit is contained in:
Petar Perisin
2013-04-22 22:47:18 +02:00
parent 09ea0d235a
commit d425d6485e
4 changed files with 98 additions and 81 deletions

View File

@@ -187,9 +187,16 @@ void BranchDialog::checkout()
QString stashMessage;
if (branchCheckoutDialog.makeStashOfCurrentBranch()
|| branchCheckoutDialog.moveLocalChangesToNextBranch()) {
gitClient->ensureStash(m_repository, currentBranch + QLatin1String("-AutoStash"),
NoPrompt, &stashMessage);
|| branchCheckoutDialog.moveLocalChangesToNextBranch()) {
GitClient::StashGuard stashGuard(m_repository,
currentBranch + QLatin1String("-AutoStash"),
NoPrompt);
if (stashGuard.stashingFailed())
return;
stashGuard.preventPop();
stashMessage = stashGuard.stashMessage();
} else if (branchCheckoutDialog.discardLocalChanges()) {
gitClient->synchronousReset(m_repository);
}