Re: [PATCH v7 2/4] worktree add: refactor opt exclusion tests
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Jan 8, 2023, 07:13 UTC
- Message-ID
- <xmqq7cxxzefp.fsf@gitster.g>
- In-Reply-To
- <20230107045757.30037-3-jacobabel@nullpo.dev>
Jacob Abel <jacobabel@nullpo.dev> writes:
Show 7 quoted lines
> +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?