From e5e384a2379427ac43db2848cc1c436f05d05a95 Mon Sep 17 00:00:00 2001 From: Orgad Shaneh Date: Sun, 17 Feb 2013 20:33:29 +0200 Subject: [PATCH] Fix popping a saved stash stash pop accepts only explicit object (stash@{N}) Change-Id: Ie3d40173ffd94849bde30076235f65d5e4e92cc2 Reviewed-by: Tobias Hunger --- src/plugins/git/gitclient.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/plugins/git/gitclient.cpp b/src/plugins/git/gitclient.cpp index eb1238a0ffa..07c7bc6c834 100644 --- a/src/plugins/git/gitclient.cpp +++ b/src/plugins/git/gitclient.cpp @@ -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()