aboutsummaryrefslogtreecommitdiff
path: root/git-stash.sh
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2010-02-16 15:04:55 -0800
committerJunio C Hamano <gitster@pobox.com>2010-02-16 15:04:55 -0800
commiteb0bcd0fbe34befe7648a398efc7f4156b07da48 (patch)
tree997b4970db45623e0267704c81a130202cb86c0e /git-stash.sh
parent7283bbc70a55d7364fbeaefc1009c03fcfc8d929 (diff)
parent003c6abdb27c367747847a76b0a7890d67c794be (diff)
downloadgit-eb0bcd0fbe34befe7648a398efc7f4156b07da48.tar.gz
git-eb0bcd0fbe34befe7648a398efc7f4156b07da48.tar.xz
Merge branch 'maint-1.6.5' into maint-1.6.6
* maint-1.6.5: dwim_ref: fix dangling symref warning stash pop: remove 'apply' options during 'drop' invocation diff: make sure --output=/bad/path is caught
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 3a0685f18..2d6919639 100755
--- a/git-stash.sh
+++ b/git-stash.sh
@@ -221,6 +221,7 @@ show_stash () {
}
apply_stash () {
+ applied_stash=
unstash_index=
while test $# != 0
@@ -242,6 +243,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
@@ -415,8 +419,7 @@ pop)
shift
if apply_stash "$@"
then
- test -z "$unstash_index" || shift
- drop_stash "$@"
+ drop_stash "$applied_stash"
fi
;;
branch)