From: Junio C Hamano Date: Wed, 26 Feb 2014 22:18:54 +0000 (-0800) Subject: stash pop: mention we did not drop the stash upon failing to apply X-Git-Tag: v1.9.2~18^2 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/2d4c99339210d43a84841a71a50e88a050d9e21b?ds=inline;hp=--cc stash pop: mention we did not drop the stash upon failing to apply Signed-off-by: Junio C Hamano --- 2d4c99339210d43a84841a71a50e88a050d9e21b diff --git a/git-stash.sh b/git-stash.sh index 1e541a2125..72941be4da 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 () {