Re: [PATCH v2 02/18] t7526: add tests for error conditions
- From
- Alexandr Miloslavskiy <alexandr.miloslavskiy@syntevo.com>
- Date
- Dec 19, 2019, 18:03 UTC
- Message-ID
- <8b300527-0800-72dc-b901-74ecbe15622a@syntevo.com>
- In-Reply-To
- <xmqqr211cmxy.fsf@gitster-ct.c.googlers.com>
On 18.12.2019 23:02, Junio C Hamano wrote:
Show 13 quoted lines
>> + test_must_fail git commit --pathspec-from-file=- --interactive -m "Commit" <list 2>err && >> + test_i18ngrep "\-\-pathspec-from-file is incompatible with \-\-interactive/\-\-patc > h" err && > > What's with the overly-noisy quoting of dashes here? To match a > string that happens to begin with a dash, either one of > > $ grep -e "-this string begins with and has-many-dashes-in-it" file > $ grep "[-]this string begins with and has-many-dashes-in-it" file > > would be sufficient and more idiomatic. > > Or am I missing some other reason why the test is written this way?
No, it's just my lack of experience. Thanks for your fix! I have applied it in V3.