Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2014-04-04 00:39:03 +0400
committerJunio C Hamano <gitster@pobox.com>2014-04-04 00:39:03 +0400
commit6248be7678ad2c262a460c052ef4f28744e75cc4 (patch)
treea2f7250376bcf36926791a73cde9615dd70111af /git-stash.sh
parent0a01752ad32169cee96bde4d6a2b218c1ebac46a (diff)
parent2d4c99339210d43a84841a71a50e88a050d9e21b (diff)
Merge branch 'jc/stash-pop-not-popped' into maint
* jc/stash-pop-not-popped: stash pop: mention we did not drop the stash upon failing to apply
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 f0a94abf143..4798bcf0e51 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 () {