stash: pass the pathspec argument to git reset
authorThomas Gummerer <t.gummerer@gmail.com>
Tue, 21 Mar 2017 22:12:18 +0000 (22:12 +0000)
committerJunio C Hamano <gitster@pobox.com>
Wed, 22 Mar 2017 21:55:55 +0000 (14:55 -0700)
commit869fb8f729a4e3486ea3c37820e97548223fac6a
tree653b24baa373b033a32e55c2540e285d199d3d3b
parent1790f4fea04c2401feda0c96e35a3b50b1ba4fe3
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>
git-stash.sh
t/t3904-stash-patch.sh