Re: [PATCH v5 2/3] stash push: avoid printing errors

2018-03-21 Thread Junio C Hamano
Thomas Gummerer writes: >> > diff --git a/git-stash.sh b/git-stash.sh >> > index 4c92ec931f..5e06f96da5 100755 >> > --- a/git-stash.sh >> > +++ b/git-stash.sh >> > @@ -308,14 +308,16 @@ push_stash () { >> >if test -z "$patch_mode" >> >then >> >test

[PATCH] stash: drop superfluos pathspec parameter (was: Re: [PATCH v5 2/3] stash push: avoid printing errors)

2018-03-21 Thread Thomas Gummerer
On 03/21, Thomas Gummerer wrote: > > Argh I just noticed we could drop the "$@" here, as this is no longer > the pathspec case. It doesn't hurt anything, except it may be a bit > confusing when reading the code. > > Although if we end up implementing 'git checkout --index ', > we'd have to add

Re: [PATCH v5 2/3] stash push: avoid printing errors

2018-03-21 Thread Thomas Gummerer
On 03/20, Junio C Hamano wrote: > Thomas Gummerer writes: > > > ... > > Fix this by avoiding the 'git clean' if a pathspec is given, and use the > > pipeline that's used for pathspec mode to get rid of the untracked files > > as well. > > That made me wonder if we can get

Re: [PATCH v5 2/3] stash push: avoid printing errors

2018-03-20 Thread Junio C Hamano
Thomas Gummerer writes: > ... > Fix this by avoiding the 'git clean' if a pathspec is given, and use the > pipeline that's used for pathspec mode to get rid of the untracked files > as well. That made me wonder if we can get rid of 'git clean' altogether by pretending that

[PATCH v5 2/3] stash push: avoid printing errors

2018-03-19 Thread Thomas Gummerer
'git stash push -u -- ' prints the following errors if only matches untracked files: fatal: pathspec 'untracked' did not match any files error: unrecognized input This is because we first clean up the untracked files using 'git clean ', and then use a command chain involving 'git add -u