From: Tanga Joris Date: Thu, 05 Nov 2026 07:53:54 GMT Subject: Re: [PATCH v3] rev-list: skip --grep argument in early scan Message-ID: In-Reply-To: <20261026083055.18873-1-azuama69@gmail.com> Hello Azuama, Thanks for working on this. I applied v3 on top of master (0ffa3e35c7) with "git am -3", because builtin/rev-list.c has changed since you sent it, so running "git am" fails. Rebasing on master would help. I built it with NO_RUST=1. t6022 passes, and both new tests fail when I revert only the change in builtin/rev-list.c, so they do catch the problem. On Mon, 26 Oct 2026 at 11:30, Azuama Odinaka Maximus wrote: > +test_expect_success "--grep accepts a pattern beginning with --" ' > + test_commit --no-tag --missing-only && > + commit=$(git rev-parse HEAD) && These lines are indented with spaces instead of a tab. "git diff --check" reports "indent with spaces" for all the new test lines. > + } else if (!strcmp(arg, "--grep")) { > + i++; This fixes --grep, but other options that take a separate value still have the same problem. In a repository whose only commit has "--missing-only" as both its subject and its author name, with this patch: $ git rev-list --grep --missing-only HEAD $ git rev-list --author --missing-only HEAD fatal: --missing-only requires --missing=print or --missing=print-info --committer and --grep-reflog fail the same way. In revision.c, 19 options are parsed with parse_long_opt(), which accepts the value as a separate argument (--author, --committer, --since, --until, --skip, --exclude and others). Should the early scan skip the value of all of them, or is there a reason to handle only --grep? If this only fixes --grep for now, the commit message could say so, because its first paragraph describes the general problem. Also, the NEEDSWORK comment just above this loop uses "--grep --exclude-promisor-objects" as its example of what the loop gets wrong. With this patch that example works, so the comment needs a new example (--author would do), or it simply becomes misleading. Thanks, Tanga