]> git.ipfire.org Git - thirdparty/git.git/commit - t/t3903-stash.sh
stash: keep untracked files intact in stash -k
authorThomas Gummerer <t.gummerer@gmail.com>
Tue, 21 Mar 2017 22:12:19 +0000 (22:12 +0000)
committerJunio C Hamano <gitster@pobox.com>
Wed, 22 Mar 2017 21:55:56 +0000 (14:55 -0700)
commite0e7f99ea400808cd11af72425c721c8b44193ca
tree74d382c2a274fc8f897a31ba071bfcc2cc507e44
parent869fb8f729a4e3486ea3c37820e97548223fac6a
stash: keep untracked files intact in stash -k

Currently when there are untracked changes in a file "one" and in a file
"two" in the repository and the user uses:

    git stash push -k one

all changes in "two" are wiped out completely.  That is clearly not the
intended result.  Make sure that only the files given in the pathspec
are changed when git stash push -k <pathspec> is used.

Reported-by: Jeff King <peff@peff.net>
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/t3903-stash.sh