Re: [PATCH v7 4/6] stash: teach 'push' (and 'create_stash') to honor pathspec

2017-02-27 Thread Junio C Hamano
Thomas Gummerer writes: > if test -z "$patch_mode" > then > - git reset --hard ${GIT_QUIET:+-q} > + if test $# != 0 > + then > + git reset ${GIT_QUIET:+-q} -- "$@" > + git checkout ${GIT_QUIET:+-q} HEAD -- $(g

Re: [PATCH v7 4/6] stash: teach 'push' (and 'create_stash') to honor pathspec

2017-02-27 Thread Junio C Hamano
Thomas Gummerer writes: > On 02/27, Junio C Hamano wrote: >> Thomas Gummerer writes: >> >> > + test -n "$untracked" || git ls-files --error-unmatch -- "$@" >/dev/null >> > || exit 1 >> >> This silent "exit 1" made me scratch my head, but --error-unmatch >> would have already given an error m

Re: [PATCH v7 4/6] stash: teach 'push' (and 'create_stash') to honor pathspec

2017-02-27 Thread Junio C Hamano
Thomas Gummerer writes: > if test -z "$patch_mode" > then > - git reset --hard ${GIT_QUIET:+-q} > + if test $# != 0 > + then > + git reset ${GIT_QUIET:+-q} -- "$@" > + git checkout ${GIT_QUIET:+-q} HEAD -- $(g

Re: [PATCH v7 4/6] stash: teach 'push' (and 'create_stash') to honor pathspec

2017-02-27 Thread Thomas Gummerer
On 02/27, Junio C Hamano wrote: > Thomas Gummerer writes: > > > + test -n "$untracked" || git ls-files --error-unmatch -- "$@" >/dev/null > > || exit 1 > > This silent "exit 1" made me scratch my head, but --error-unmatch > would have already given an error message, like > > error: paths

Re: [PATCH v7 4/6] stash: teach 'push' (and 'create_stash') to honor pathspec

2017-02-27 Thread Thomas Gummerer
On 02/27, Junio C Hamano wrote: > Thomas Gummerer writes: > > > if test -z "$patch_mode" > > then > > - git reset --hard ${GIT_QUIET:+-q} > > + if test $# != 0 > > + then > > + git reset ${GIT_QUIET:+-q} -- "$@" > > + git c

Re: [PATCH v7 4/6] stash: teach 'push' (and 'create_stash') to honor pathspec

2017-02-27 Thread Junio C Hamano
Thomas Gummerer writes: > + test -n "$untracked" || git ls-files --error-unmatch -- "$@" >/dev/null > || exit 1 This silent "exit 1" made me scratch my head, but --error-unmatch would have already given an error message, like error: pathspec 'no such' did not match any file(s) known to

[PATCH v7 4/6] stash: teach 'push' (and 'create_stash') to honor pathspec

2017-02-25 Thread Thomas Gummerer
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 f