Re: [PATCH v7 2/4] worktree add: refactor opt exclusion tests
- From
Jacob Abel <jacobabel@nullpo.dev>
- Date
- Jan 8, 2023, 15:08 UTC
- Message-ID
- <20230108150814.sgyaimedaxfqo4na@phi>
- In-Reply-To
- <xmqq7cxxzefp.fsf@gitster.g>
On 23/01/08 04:13PM, Junio C Hamano wrote:
Show 13 quoted lines
> Jacob Abel <jacobabel@nullpo.dev> writes:
>
> > +test_wt_add_excl () {
> > + local opts="$*" &&
> > + test_expect_success "'worktree add' with '$opts' has mutually exclusive options" '
> > + test_must_fail git worktree add $opts 2>actual &&
> > + grep -P "fatal:( options)? .* cannot be used together" actual
> > + '
> > +}
>
> Of course, "grep -P" is non-portable and CI jobs are easily broken.
> Isn't -E (ERE) sufficient here?
>Sorry. Changed. I can push out a new revision with this applied right away if that's acceptable.