Git: Use stash pop instead of apply...

... when the stash should be removed on successful pop

Change-Id: I39b2c01b0a518d3c70bcb8dc898191cca6d3e84d
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
This commit is contained in:
Orgad Shaneh
2013-01-22 21:02:20 +02:00
committed by Orgad Shaneh
parent 53443616e5
commit daef1fbb88
5 changed files with 7 additions and 8 deletions

View File

@@ -338,7 +338,7 @@ void StashDialog::restoreCurrent()
// Make sure repository is not modified, restore. The command will
// output to window on success.
const bool success = promptForRestore(&name, 0, &errorMessage)
&& gitClient()->synchronousStashRestore(m_repository, name, QString(), &errorMessage);
&& gitClient()->synchronousStashRestore(m_repository, name, false, QString(), &errorMessage);
if (success) {
refresh(m_repository, true); // Might have stashed away local changes.
} else {
@@ -355,7 +355,7 @@ void StashDialog::restoreCurrentInBranch()
QString branch;
QString name = m_model->at(index).name;
const bool success = promptForRestore(&name, &branch, &errorMessage)
&& gitClient()->synchronousStashRestore(m_repository, name, branch, &errorMessage);
&& gitClient()->synchronousStashRestore(m_repository, name, false, branch, &errorMessage);
if (success) {
refresh(m_repository, true); // git deletes the stash, unfortunately.
} else {