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:
authorThomas Gummerer <t.gummerer@gmail.com>2017-03-22 01:12:18 +0300
committerJunio C Hamano <gitster@pobox.com>2017-03-23 00:55:55 +0300
commit869fb8f729a4e3486ea3c37820e97548223fac6a (patch)
tree653b24baa373b033a32e55c2540e285d199d3d3b /git-stash.sh
parent1790f4fea04c2401feda0c96e35a3b50b1ba4fe3 (diff)
stash: pass the pathspec argument to git reset
For "git stash -p --no-keep-index", the pathspec argument is currently not passed to "git reset". This means that changes that are staged but that are excluded from the pathspec still get unstaged by git stash -p. Make sure that doesn't happen by passing the pathspec argument to the git reset in question, bringing the behaviour in line with "git stash -- <pathspec>". Signed-off-by: Thomas Gummerer <t.gummerer@gmail.com> Reviewed-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'git-stash.sh')
-rwxr-xr-xgit-stash.sh2
1 files changed, 1 insertions, 1 deletions
diff --git a/git-stash.sh b/git-stash.sh
index ba86d84321..13711764a9 100755
--- a/git-stash.sh
+++ b/git-stash.sh
@@ -322,7 +322,7 @@ push_stash () {
if test "$keep_index" != "t"
then
- git reset -q
+ git reset -q -- "$@"
fi
fi
}