Re: [PATCH v3 5/5] stash: teach 'push' (and 'create') to honor pathspec
- From
Jeff King <peff@peff.net>
- Date
- Feb 6, 2017, 15:20 UTC
- Message-ID
- <20170206152013.4qv6734jcdnuvekt@sigill.intra.peff.net>
- In-Reply-To
- <xmqqmvdz3ied.fsf@gitster.mtv.corp.google.com>
On Sun, Feb 05, 2017 at 11:09:14PM -0800, Junio C Hamano wrote:
Show 16 quoted lines
> > @@ -99,6 +104,10 @@ create_stash () {
> > if test -z "$new_style"
> > then
> > stash_msg="$*"
> > + while test $# != 0
> > + do
> > + shift
> > + done
> > fi
>
> The intent is correct, but I would probaly empty the "$@" not with
> an iteration of shifts but with a single
>
> set x && shift
>
> ;-)Perhaps it is not portable, but I think "set --" does the same thing and is perhaps less obscure.
-Peff