Fix popping a saved stash

stash pop accepts only explicit object (stash@{N})

Change-Id: Ie3d40173ffd94849bde30076235f65d5e4e92cc2
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
This commit is contained in:
Orgad Shaneh
2013-02-17 20:33:29 +02:00
committed by Orgad Shaneh
parent e953743d90
commit e5e384a237

View File

@@ -2551,8 +2551,11 @@ GitClient::StashGuard::StashGuard(const QString &workingDirectory, const QString
GitClient::StashGuard::~StashGuard()
{
if (pop && stashResult == GitClient::Stashed)
client->stashPop(workingDir, message);
if (pop && stashResult == GitClient::Stashed) {
QString stashName;
if (client->stashNameFromMessage(workingDir, message, &stashName))
client->stashPop(workingDir, stashName);
}
}
void GitClient::StashGuard::preventPop()