forked from qt-creator/qt-creator
Git: make ensureStash dialog more clear.
Change-Id: I19ecde462d7a8a5fb00caa0414a9833ecab5057b Reviewed-by: Orgad Shaneh <orgads@gmail.com>
This commit is contained in:
@@ -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()) {
|
||||
|
||||
Reference in New Issue
Block a user