From: Jeff King Date: Mon, 06 Feb 2017 15:20:13 GMT Subject: Re: [PATCH v3 5/5] stash: teach 'push' (and 'create') to honor pathspec Message-ID: <20170206152013.4qv6734jcdnuvekt@sigill.intra.peff.net> In-Reply-To: On Sun, Feb 05, 2017 at 11:09:14PM -0800, Junio C Hamano wrote: > > @@ -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