From 2d4c99339210d43a84841a71a50e88a050d9e21b Mon Sep 17 00:00:00 2001 From: Junio C Hamano Date: Wed, 26 Feb 2014 14:18:54 -0800 Subject: stash pop: mention we did not drop the stash upon failing to apply Signed-off-by: Junio C Hamano 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 () { -- cgit v0.10.2-6-g49f6