git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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.
Previous: Pushkar SinghNext: Azuama Odinaka Maximus
Message 5 of 11 in “rev-list: skip --grep argument in early scan”
  1. rev-list: skip --grep argument in early scanAzuama Odinaka Maximus, Oct 21, 2026
  2. Pushkar SinghOct 21, 2026
  3. rev-list: skip --grep argument in early scanAzuama Odinaka Maximus, Oct 21, 2026
  4. Pushkar SinghOct 22, 2026
  5. Junio C HamanoOct 23, 2026
  6. rev-list: skip --grep argument in early scanAzuama Odinaka Maximus, Oct 26, 2026
  7. Tanga JorisNov 5, 2026
  8. rev-list: handle arguments in early option scanAzuama Odinaka Maximus, Nov 5, 2026
  9. Junio C HamanoNov 6, 2026
  10. Azuama Odinaka MaximusNov 6, 2026
  11. Junio C HamanoNov 6, 2026

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.