Re: [PATCH v5 2/3] stash push: avoid printing errors
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Mar 21, 2018, 21:56 UTC
- Message-ID
- <xmqq4ll9nld2.fsf@gitster-ct.c.googlers.com>
- In-Reply-To
- <20180321213626.GG2224@hank>
Thomas Gummerer <t.gummerer@gmail.com> writes:
Show 16 quoted lines
>> > 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 "$untracked" = "all" && CLEAN_X_OPTION=-x || CLEAN_X_OPTION=
>> > - if test -n "$untracked"
>> > + if test -n "$untracked" && test $# = 0
>> > then
>> > git clean --force --quiet -d $CLEAN_X_OPTION -- "$@"
>
> 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.Yes, we could, but we do not have to. I think it is fine to leave it in especially if we envision that the codepaths for two cases will be unified in the future.