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

Re: [GSoC PATCH v2 1/2] repo: add the flag -z as an alias for --format=nul

From
Lucas Seiki Oshiro <lucasseikioshiro@gmail.com>
Date
Sep 1, 2025, 13:50 UTC
Message-ID
<FBD7B727-BE36-45FF-BD19-8086701C9753@gmail.com>
In-Reply-To
<xmqqcy8frqn2.fsf@gitster.g>
Show 5 quoted lines
> Putting the devil's advocate hat on, "--format=<plain,nul>" was an
> attempt to avoid needless proliferation of options (e.g. presense of
> "-z" would tempt people into add "--json" when they introduce
> "--format=json"), so it may not be unconditionally a good idea to
> mimic these older commands where there are only two output formats.
Yeah, I understand...
Show 7 quoted lines
> You'd probably need to define a parseopt callback function for
> "format" and "-z", and remember the one that you saw the last.  So
> giving "-z --format=nul --format=text" would first set an internal
> "format" to FORMAT_NUL_TERMINATED (due to "-z"), and then to the
> same FORMAT_NUL_TERMINATED again (due to "--format=nul"), and then
> finally to FORMAT_TEXT (due to "--format=text"), or something like
> that, which would give the familiar "the last one wins" semantics.

Ok, accepted! I'll also replace the tests and the documentation in order to match this behavior. Thanks!

Previous: Junio C HamanoNext: Lucas Seiki Oshiro
Message 27 of 37 in “repo: add -z and objects.format”
  1. 0/2 repo: add -z and objects.formatLucas Seiki Oshiro, Aug 20, 2025
  2. 1/2 repo: add the flag -z as an alias for --format=nulLucas Seiki Oshiro, Aug 20, 2025
  3. Karthik NayakAug 21, 2025
  4. Junio C HamanoAug 21, 2025
  5. Karthik NayakAug 21, 2025
  6. Patrick SteinhardtAug 21, 2025
  7. Lucas Seiki OshiroAug 21, 2025
  8. Junio C HamanoAug 21, 2025
  9. Lucas Seiki OshiroAug 21, 2025
  10. Junio C HamanoAug 21, 2025
  11. Jean-Noël AVILAAug 21, 2025
  12. Junio C HamanoAug 21, 2025
  13. 2/2 repo: add the field objects.formatLucas Seiki Oshiro, Aug 20, 2025
  14. Patrick SteinhardtAug 21, 2025
  15. Junio C HamanoAug 21, 2025
  16. Lucas Seiki OshiroAug 26, 2025
  17. Karthik NayakAug 21, 2025
  18. Junio C HamanoAug 21, 2025
  19. Patrick SteinhardtAug 21, 2025
  20. Lucas Seiki OshiroAug 21, 2025
  21. Patrick SteinhardtAug 21, 2025
  22. Junio C HamanoAug 21, 2025
  23. Lucas Seiki OshiroAug 26, 2025
  24. 0/2 repo: add -z and objects.formatLucas Seiki Oshiro, Aug 26, 2025
  25. 1/2 repo: add the flag -z as an alias for --format=nulLucas Seiki Oshiro, Aug 26, 2025
  26. Junio C HamanoAug 28, 2025
  27. Lucas Seiki OshiroSep 1, 2025
  28. 2/2 repo: add the field objects.formatLucas Seiki Oshiro, Aug 26, 2025
  29. 0/2 repo: add -z and objects.formatLucas Seiki Oshiro, Sep 1, 2025
  30. 1/2 repo: add the flag -z as an alias for --format=nulLucas Seiki Oshiro, Sep 1, 2025
  31. Junio C HamanoSep 2, 2025
  32. Lucas Seiki OshiroSep 2, 2025
  33. 2/2 repo: add the field objects.formatLucas Seiki Oshiro, Sep 1, 2025
  34. 0/2 repo: add -z and objects.formatLucas Seiki Oshiro, Sep 4, 2025
  35. 1/2 repo: add the flag -z as an alias for --format=nulLucas Seiki Oshiro, Sep 4, 2025
  36. 2/2 repo: add the field objects.formatLucas Seiki Oshiro, Sep 4, 2025
  37. Junio C HamanoSep 4, 2025

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.