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

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'git-stash.sh')
-rwxr-xr-xgit-stash.sh7
1 files changed, 5 insertions, 2 deletions
diff --git a/git-stash.sh b/git-stash.sh
index 4febbbfa5d..79b2771099 100755
--- a/git-stash.sh
+++ b/git-stash.sh
@@ -222,6 +222,7 @@ show_stash () {
}
apply_stash () {
+ applied_stash=
unstash_index=
while test $# != 0
@@ -243,6 +244,9 @@ apply_stash () {
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
@@ -421,8 +425,7 @@ pop)
shift
if apply_stash "$@"
then
- test -z "$unstash_index" || shift
- drop_stash "$@"
+ drop_stash "$applied_stash"
fi
;;
branch)