Git: make ensureStash dialog more clear.

Change-Id: I19ecde462d7a8a5fb00caa0414a9833ecab5057b
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
This commit is contained in:
Petar Perisin
2013-03-16 15:12:28 +01:00
parent 39d000430e
commit 93e51c186a
5 changed files with 69 additions and 46 deletions

View File

@@ -470,10 +470,8 @@ void BranchModel::checkoutBranch(const QModelIndex &idx)
if (branch.isEmpty())
return;
GitClient::StashGuard stashGuard(m_workingDirectory, QLatin1String("Branch-Checkout"));
if (stashGuard.stashingFailed(false))
return;
stashGuard.preventPop();
// No StashGuard since this function for now is only used with clean working dir.
// If it is ever used from another place, please add StashGuard here
QString errorMessage;
if (m_client->synchronousCheckout(m_workingDirectory, branch, &errorMessage)) {
if (errorMessage.isEmpty()) {