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

[PATCH 0/6] Make trailer_info struct private (plus sequencer cleanup)

From
LGLinus Arver via GitGitGadget <gitgitgadget@gmail.com>
Date
Mar 16, 2024, 06:27 UTC
Message-ID
<pull.1696.git.1710570428.gitgitgadget@gmail.com>
NOTE: This series is based on the la/format-trailer-info topic branch (see
its discussion at [1]).

This series is based on the initial series [2], notably the v4 version of patches 17-20 as suggested by Christian [3]. This version addresses the review comments for those patches, namely the splitting up of Patch 19 there into 3 separate patches [4] (as Patches 03-05 here) .

The central idea is to make the trailer_info struct private (that is, move its definition from trailer.h to trailer.c) --- aka the "pimpl" idiom. See the detailed commit message for Patch 05 for the motivation behind the change.

Patch 02 makes sequencer.c a well-behaved trailer API consumer, by making use of the trailer iterator. Patch 01 prepares us for Patch 02. Patch 06 slightly reduces the weight of the API by removing (from the API surface) an unused function.

[1] https://lore.kernel.org/git/pull.1694.git.1710485706.gitgitgadget@gmail.com/ [2] https://lore.kernel.org/git/pull.1632.v4.git.1707196348.gitgitgadget@gmail.com/ [3] https://lore.kernel.org/git/CAP8UFD08F0V13X0+CJ1uhMPzPWVMs2okGVMJch0DkQg5M3BWLA@mail.gmail.com/ [4] https://lore.kernel.org/git/CAP8UFD1twELGKvvesxgCrZrypKZpgSt04ira3mvurG1UbpDfxQ@mail.gmail.com/

Linus Arver (6):
  trailer: teach iterator about non-trailer lines
  sequencer: use the trailer iterator
  interpret-trailers: access trailer_info with new helpers
  trailer: make parse_trailers() return trailer_info pointer
  trailer: make trailer_info struct private
  trailer: retire trailer_info_get() from API
 builtin/interpret-trailers.c |  12 +--
 sequencer.c                  |  27 +++---
 trailer.c                    | 161 ++++++++++++++++++++++-------------
 trailer.h                    |  46 ++++------
 4 files changed, 137 insertions(+), 109 deletions(-)
base-commit: 3452d173241c8b87ecdd67f91f594cb14327e394
Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-1696%2Flistx%2Ftrailer-api-part-3-v1
Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-1696/listx/trailer-api-part-3-v1
Pull-Request: https://github.com/gitgitgadget/git/pull/1696
-- 
gitgitgadget
Next: Linus Arver via GitGitGadget
Message 1 of 66 in “Make trailer_info struct private (plus sequencer cleanup)”
  1. 0/6 Make trailer_info struct private (plus sequencer cleanup)Linus Arver via GitGitGadget, Mar 16, 2024
  2. 1/6 trailer: teach iterator about non-trailer linesLinus Arver via GitGitGadget, Mar 16, 2024
  3. 2/6 sequencer: use the trailer iteratorLinus Arver via GitGitGadget, Mar 16, 2024
  4. 3/6 interpret-trailers: access trailer_info with new helpersLinus Arver via GitGitGadget, Mar 16, 2024
  5. 4/6 trailer: make parse_trailers() return trailer_info pointerLinus Arver via GitGitGadget, Mar 16, 2024
  6. 5/6 trailer: make trailer_info struct privateLinus Arver via GitGitGadget, Mar 16, 2024
  7. 6/6 trailer: retire trailer_info_get() from APILinus Arver via GitGitGadget, Mar 16, 2024
  8. Junio C HamanoMar 16, 2024
  9. Junio C HamanoMar 26, 2024
  10. Linus ArverApr 19, 2024
  11. 0/8 Make trailer_info struct private (plus sequencer cleanup)Linus Arver via GitGitGadget, Apr 19, 2024
  12. 1/8 Makefile: sort UNIT_TEST_PROGRAMSLinus Arver via GitGitGadget, Apr 19, 2024
  13. 2/8 trailer: add unit tests for trailer iteratorLinus Arver via GitGitGadget, Apr 19, 2024
  14. Linus ArverApr 19, 2024
  15. Linus ArverApr 19, 2024
  16. Junio C HamanoApr 19, 2024
  17. Linus ArverApr 20, 2024
  18. 3/8 trailer: teach iterator about non-trailer linesLinus Arver via GitGitGadget, Apr 19, 2024
  19. 4/8 sequencer: use the trailer iteratorLinus Arver via GitGitGadget, Apr 19, 2024
  20. Junio C HamanoApr 23, 2024
  21. 5/8 interpret-trailers: access trailer_info with new helpersLinus Arver via GitGitGadget, Apr 19, 2024
  22. 7/8 trailer: make trailer_info struct privateLinus Arver via GitGitGadget, Apr 19, 2024
  23. Junio C HamanoApr 23, 2024
  24. Linus ArverApr 25, 2024
  25. 6/8 trailer: make parse_trailers() return trailer_info pointerLinus Arver via GitGitGadget, Apr 19, 2024
  26. Junio C HamanoApr 23, 2024
  27. 8/8 trailer: retire trailer_info_get() from APILinus Arver via GitGitGadget, Apr 19, 2024
  28. Junio C HamanoApr 23, 2024
  29. Junio C HamanoApr 24, 2024
  30. 00/10 Make trailer_info struct private (plus sequencer cleanup)Linus Arver via GitGitGadget, Apr 26, 2024
  31. 01/10 Makefile: sort UNIT_TEST_PROGRAMSLinus Arver via GitGitGadget, Apr 26, 2024
  32. 02/10 trailer: add unit tests for trailer iteratorLinus Arver via GitGitGadget, Apr 26, 2024
  33. Christian CouderApr 26, 2024
  34. Junio C HamanoApr 26, 2024
  35. Linus ArverApr 26, 2024
  36. 03/10 trailer: teach iterator about non-trailer linesLinus Arver via GitGitGadget, Apr 26, 2024
  37. Christian CouderApr 27, 2024
  38. Linus ArverApr 30, 2024
  39. Linus ArverApr 30, 2024
  40. 04/10 sequencer: use the trailer iteratorLinus Arver via GitGitGadget, Apr 26, 2024
  41. 05/10 interpret-trailers: access trailer_info with new helpersLinus Arver via GitGitGadget, Apr 26, 2024
  42. 06/10 trailer: make parse_trailers() return trailer_info pointerLinus Arver via GitGitGadget, Apr 26, 2024
  43. 07/10 trailer: make trailer_info struct privateLinus Arver via GitGitGadget, Apr 26, 2024
  44. 08/10 trailer: retire trailer_info_get() from APILinus Arver via GitGitGadget, Apr 26, 2024
  45. 10/10 trailer unit tests: inspect iterator contentsLinus Arver via GitGitGadget, Apr 26, 2024
  46. 09/10 trailer: document parse_trailers() usageLinus Arver via GitGitGadget, Apr 26, 2024
  47. Christian CouderApr 27, 2024
  48. 00/10 Make trailer_info struct private (plus sequencer cleanup)Linus Arver via GitGitGadget, May 2, 2024
  49. 01/10 Makefile: sort UNIT_TEST_PROGRAMSLinus Arver via GitGitGadget, May 2, 2024
  50. 02/10 trailer: add unit tests for trailer iteratorLinus Arver via GitGitGadget, May 2, 2024
  51. Junio C HamanoMay 2, 2024
  52. 03/10 trailer: teach iterator about non-trailer linesLinus Arver via GitGitGadget, May 2, 2024
  53. Phillip WoodMay 4, 2024
  54. Linus ArverMay 5, 2024
  55. Phillip WoodMay 5, 2024
  56. Linus ArverMay 9, 2024
  57. Phillip WoodMay 13, 2024
  58. Phillip WoodMay 13, 2024
  59. 04/10 sequencer: use the trailer iteratorLinus Arver via GitGitGadget, May 2, 2024
  60. 05/10 interpret-trailers: access trailer_info with new helpersLinus Arver via GitGitGadget, May 2, 2024
  61. 06/10 trailer: make parse_trailers() return trailer_info pointerLinus Arver via GitGitGadget, May 2, 2024
  62. 07/10 trailer: make trailer_info struct privateLinus Arver via GitGitGadget, May 2, 2024
  63. 08/10 trailer: retire trailer_info_get() from APILinus Arver via GitGitGadget, May 2, 2024
  64. 09/10 trailer: document parse_trailers() usageLinus Arver via GitGitGadget, May 2, 2024
  65. 10/10 trailer unit tests: inspect iterator contentsLinus Arver via GitGitGadget, May 2, 2024
  66. Junio C HamanoMay 2, 2024

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.