diff options
author | Junio C Hamano <gitster@pobox.com> | 2014-02-26 14:18:54 -0800 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2014-02-26 14:18:54 -0800 |
commit | 2d4c99339210d43a84841a71a50e88a050d9e21b (patch) | |
tree | 6eca42dec3736e2af07de1443c73a0b2eb032ed8 | |
parent | 2f93541d88fadd1ff5307d81c2c8921ee3eea058 (diff) | |
download | git-2d4c99339210d43a84841a71a50e88a050d9e21b.tar.gz git-2d4c99339210d43a84841a71a50e88a050d9e21b.tar.xz |
stash pop: mention we did not drop the stash upon failing to apply
Signed-off-by: Junio C Hamano <gitster@pobox.com>
-rwxr-xr-x | git-stash.sh | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/git-stash.sh b/git-stash.sh index 1e541a212..72941be4d 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 () { |