stash pop: mention we did not drop the stash upon failing to apply

Signed-off-by: Junio C Hamano <gitster@pobox.com>

Junio C Hamano committed Feb 26, 2014 at 14:18 UTC 2d4c99339210d43a84841a71a50e88a050d9e21b
1 file changed +8 -2
git-stash.sh
+8 -2
@@ -512,8 +512,14 @@ apply_stash () {
512 pop_stash() {
513 assert_stash_ref "$@"
514
515 - apply_stash "$@" &&
516 - drop_stash "$@"
515 + if apply_stash "$@"
516 + then
517 + drop_stash "$@"
518 + else
519 + status=$?
520 + say "The stash is kept in case you need it again."
521 + exit $status
522 + fi
523 }
524
525 drop_stash () {