diff --git a/git-stash.sh b/git-stash.sh
index 3a0685f1893098e8f5c877f509183c8434e7c028..2d691963934c31242512bd4dd349d970c0350243 100755 (executable)
--- a/git-stash.sh
+++ b/git-stash.sh
}
apply_stash () {
+ applied_stash=
unstash_index=
while test $# != 0
if test $# = 0
then
have_stash || die 'Nothing to apply'
+ applied_stash="$ref_stash@{0}"
+ else
+ applied_stash="$*"
fi
# stash records the work tree, and is a merge between the
shift
if apply_stash "$@"
then
- test -z "$unstash_index" || shift
- drop_stash "$@"
+ drop_stash "$applied_stash"
fi
;;
branch)