forked from qt-creator/qt-creator
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:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user