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

Re: [Outreachy PATCH v3 2/2] git.c: drop NO_PARSEOPT from builtins that use parse-options

From
TJTanga Joris <tangajoris@gmail.com>
Date
Nov 2, 2026, 02:26 UTC
Message-ID
<CAKrRMNogw6rUsZzDsEPLmLAmjB6fvcH4njga+_qBz554x8oEwg@mail.gmail.com>
In-Reply-To
<d026d6a0-5b1b-4bbf-bd1f-5f41c9c2a4e4@gmail.com>
Hello Kaartic,
Thanks for reviewing my patch 2/2, and for writing the test sketch.

On Fri, 30 Oct 2026 at 13:21, Kaartic Sivaraam <kaartic.sivaraam@gmail.com> wrote:

> This looks good to me. I was wondering if it would be valuable to also
> add a test so that any future commands that start using parse_options()
> could be caught if the corresponding change does not also remove
> NO_PARSEOPT from the command?

I also think the test is a good idea. It would definitely catch future commands that switch to parse-options but forget to remove NO_PARSEOPT.

I tried your sketch on top of this series. Without 2/2, it fails for diff-pairs, fast-import and patch-id, so it catches the bug this patch fixes. With patch 2/2, it passes. I had to remove the 'false &&' line to make it run, which I think was left over from testing.

It does not catch var, though, because var only has short options (like -l), and the test looks for lines starting with '--'.

Currently, I am not sure how to make the test catch commands with only short options, because the helper only lists those with long options. Do you have an idea on how we could do this?

Would you like the test inside 2/2, or as a separate patch 3/3?

Thanks, Tanga

Previous: Kaartic SivaraamNext: Kaartic Sivaraam
Message 11 of 13 in “git.c: drop NO_PARSEOPT from builtins that use parse-options”
  1. git.c: drop NO_PARSEOPT from builtins that use parse-optionsTanga Joris, Oct 24, 2026
  2. René ScharfeOct 25, 2026
  3. Tanga JorisOct 26, 2026
  4. Junio C HamanoOct 26, 2026
  5. 1/2 fast-import: handle --git-completion-helper before reading inputTanga Joris, Oct 29, 2026
  6. 2/2 git.c: drop NO_PARSEOPT from builtins that use parse-optionsTanga Joris, Oct 29, 2026
  7. Junio C HamanoOct 29, 2026
  8. 1/2 parse-options: answer --git-completion-helper before command runsTanga Joris, Oct 29, 2026
  9. 2/2 git.c: drop NO_PARSEOPT from builtins that use parse-optionsTanga Joris, Oct 29, 2026
  10. Kaartic SivaraamOct 30, 2026
  11. Tanga JorisNov 2, 2026
  12. Kaartic SivaraamOct 30, 2026
  13. Tanga JorisOct 31, 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.