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
@@ -1125,7 +1125,8 @@ void GitPlugin::stash()
|
||||
// Simple stash without prompt, reset repo.
|
||||
const VcsBase::VcsBasePluginState state = currentState();
|
||||
QTC_ASSERT(state.hasTopLevel(), return);
|
||||
const QString id = m_gitClient->synchronousStash(state.topLevel(), QString(), 0);
|
||||
QString id;
|
||||
gitClient()->ensureStash(state.topLevel(), QString(), false, &id);
|
||||
if (!id.isEmpty() && m_stashDialog)
|
||||
m_stashDialog->refresh(state.topLevel(), true);
|
||||
}
|
||||
@@ -1135,7 +1136,8 @@ void GitPlugin::stashSnapshot()
|
||||
// Prompt for description, restore immediately and keep on working.
|
||||
const VcsBase::VcsBasePluginState state = currentState();
|
||||
QTC_ASSERT(state.hasTopLevel(), return);
|
||||
const QString id = m_gitClient->synchronousStash(state.topLevel(), QString(), GitClient::StashImmediateRestore|GitClient::StashPromptDescription);
|
||||
const QString id = m_gitClient->synchronousStash(state.topLevel(), QString(),
|
||||
GitClient::StashImmediateRestore|GitClient::StashPromptDescription);
|
||||
if (!id.isEmpty() && m_stashDialog)
|
||||
m_stashDialog->refresh(state.topLevel(), true);
|
||||
}
|
||||
|
Reference in New Issue
Block a user