Re: [PATCH v2] rev-list: skip --grep argument in early scan
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Oct 23, 2026, 18:14 UTC
- Message-ID
- <xmqqzew45loc.fsf@gitster.g>
- In-Reply-To
- <20261021172458.6373-1-azuama69@gmail.com>
Azuama Odinaka Maximus <azuama69@gmail.com> writes:
Show 10 quoted lines
> +test_expect_success "--grep accepts a pattern beginning with --" ' > + git rev-list --grep=--missing-only --max-count=1 HEAD >expect && > + git rev-list --grep --missing-only --max-count=1 HEAD >actual && > + test_cmp expect actual > +' > +test_expect_success "--grep does not trigger --exclude-promisor-objects in early scan" ' > + git rev-list --grep=--exclude-promisor-objects --missing=print HEAD >expect && > + git rev-list --grep --exclude-promisor-objects --missing=print HEAD >actual && > + test_cmp expect actual > +'
Have a blank line between tests.
Do these tests truly verify anything beyond "the command line parser is not broken by my commit"? There is nothing in the history that would trigger '--missing-only'; there is no positive indication that the pattern starting with "--" was used by '--grep' at all. The only clue that '--missing-only' was not taken as a command line option is that the command did not fail due to a lack of '--missing=<how>'.
The same issue exists in the second added test.
Thanks.