Re: [PATCH v6 2/4] worktree add: refactor opt exclusion tests
- From
Jacob Abel <jacobabel@nullpo.dev>
- Date
- Dec 29, 2022, 06:51 UTC
- Message-ID
- <20221229065142.fmfviwisjmxsey7b@phi>
- In-Reply-To
- <xmqq5ydvpu1o.fsf@gitster.g>
On 22/12/28 09:54PM, Junio C Hamano wrote:
Show 7 quoted lines
> Jacob Abel <jacobabel@nullpo.dev> writes: > > > +# Saves parameter sequence/array as a string so they can be safely stored in a > > +# variable and restored with `eval "set -- $arr"`. Sourced from > > +# https://stackoverflow.com/a/27503158/15064705 > > Please do not copy from source with unknown licensing terms.
Understood. I have removed it.
> > Isn't it sufficient to stringify "$*" and let it later split at $IFS > boundary for the particular purpose of this test anyway?
Yes for these particular tests that should be acceptable. I tried putting an alternative together that still provides an avenue for handling quoted arguments without the helper [1]. Would this work?
1. https://lore.kernel.org/git/20221229063823.ij3jjuaar2fsayju@phi/