summaryrefslogtreecommitdiff
path: root/git-stash.sh
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2014-02-26 22:18:54 (GMT)
committerJunio C Hamano <gitster@pobox.com>2014-02-26 22:18:54 (GMT)
commit2d4c99339210d43a84841a71a50e88a050d9e21b (patch)
tree6eca42dec3736e2af07de1443c73a0b2eb032ed8 /git-stash.sh
parent2f93541d88fadd1ff5307d81c2c8921ee3eea058 (diff)
downloadgit-2d4c99339210d43a84841a71a50e88a050d9e21b.zip
git-2d4c99339210d43a84841a71a50e88a050d9e21b.tar.gz
git-2d4c99339210d43a84841a71a50e88a050d9e21b.tar.bz2
stash pop: mention we did not drop the stash upon failing to apply
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'git-stash.sh')
-rwxr-xr-xgit-stash.sh10
1 files changed, 8 insertions, 2 deletions
diff --git a/git-stash.sh b/git-stash.sh
index 1e541a2..72941be 100755
--- a/git-stash.sh
+++ b/git-stash.sh
@@ -512,8 +512,14 @@ apply_stash () {
pop_stash() {
assert_stash_ref "$@"
- apply_stash "$@" &&
- drop_stash "$@"
+ if apply_stash "$@"
+ then
+ drop_stash "$@"
+ else
+ status=$?
+ say "The stash is kept in case you need it again."
+ exit $status
+ fi
}
drop_stash () {