stash: teach 'push' (and 'create_stash') to honor pathspec
authorThomas Gummerer <t.gummerer@gmail.com>
Tue, 28 Feb 2017 20:33:38 +0000 (20:33 +0000)
committerJunio C Hamano <gitster@pobox.com>
Tue, 28 Feb 2017 22:21:05 +0000 (14:21 -0800)
commitdf6bba0937209d679a06addd26975593fef744f2
treea4f22b7e2d13ff8fadc931d4002136259b9a0f38
parent9ca6326dff29b97cfb126e6460105920c492fa15
stash: teach 'push' (and 'create_stash') to honor pathspec

While working on a repository, it's often helpful to stash the changes
of a single or multiple files, and leave others alone.  Unfortunately
git currently offers no such option.  git stash -p can be used to work
around this, but it's often impractical when there are a lot of changes
over multiple files.

Allow 'git stash push' to take pathspec to specify which paths to stash.

Helped-by: Junio C Hamano <gitster@pobox.com>
Signed-off-by: Thomas Gummerer <t.gummerer@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Documentation/git-stash.txt
git-stash.sh
t/t3903-stash.sh
t/t3905-stash-include-untracked.sh