Skip to content

Commit

Permalink
Merge branch 'jc/stash-pop-not-popped' into maint
Browse files Browse the repository at this point in the history
* jc/stash-pop-not-popped:
  stash pop: mention we did not drop the stash upon failing to apply
  • Loading branch information
Junio C Hamano committed Apr 3, 2014
2 parents 0a01752 + 2d4c993 commit 6248be7
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions git-stash.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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 () {
Expand Down

0 comments on commit 6248be7

Please sign in to comment.