diff options
Diffstat (limited to 'git-stash.sh')
-rwxr-xr-x | git-stash.sh | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/git-stash.sh b/git-stash.sh index 750f360da9..ac4c0f69cf 100755 --- a/git-stash.sh +++ b/git-stash.sh @@ -423,6 +423,13 @@ apply_stash () { fi } +pop_stash() { + assert_stash_ref "$@" + + apply_stash "$@" && + drop_stash "$@" +} + drop_stash () { assert_stash_ref "$@" @@ -498,10 +505,7 @@ drop) ;; pop) shift - if apply_stash "$@" - then - drop_stash "$applied_stash" - fi + pop_stash "$@" ;; branch) shift |