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

[PATCH v6 0/4] rebase: support --trailer

From
Li Chen <me@linux.beauty>
Date
Nov 5, 2025, 14:29 UTC
Message-ID
<20251105142944.73061-1-me@linux.beauty>
From: Li Chen <chenl311@chinatelecom.cn>

This series routes all trailer insertion through an in-process path, removing the fork/exec to builtin/interpret-trailers and tempfile juggling. The first three commits centralize logic to reduce overhead and simplify error handling. The final commit adds git rebase --trailer, currently supported with the merge backend only (rejecting apply-only scenarios and validating input early).

all t/*.sh testcases have run successfully.

v6: squash all fix commits and split refactor step from the original patch based on Phillip's suggestion and codes [4]. v5: fix all Kristoffer's review comments form v4[3] in place and without new patches. v4: fix all reviewer comments in v3. [2], and add patch 1~8 & 10~29 to fix review comments. v3: merges the remaining trailer paths into one in-process helper, dropping the duplicate code, as pointed by Junio and Phillip [1] v2: fix issues pointed by Phillip RFC link: https://lore.kernel.org/git/196a5ac1393.f5b4db7d187309.2451613571977217927@linux.beauty/

Comments very very welcome!

[1]: https://lore.kernel.org/git/xmqq8qlzkukw.fsf@gitster.g/ [2]: https://lore.kernel.org/git/20250803150059.402017-1-me@linux.beauty/ [3]: https://lore.kernel.org/git/20251014122452.1851103-1-me@linux.beauty/ [4]: https://lore.kernel.org/git/7d12b046-365f-441c-af8e-8a39d61efbbd@gmail.com/

Li Chen (4):
  interpret-trailers: factor out buffer-based processing to
    process_trailers()
  trailer: move process_trailers to trailer.h
  trailer: append trailers in-process and drop the fork to
    `interpret-trailers`
  rebase: support --trailer
 Documentation/git-rebase.adoc |   9 ++-
 builtin/commit.c              |   2 +-
 builtin/interpret-trailers.c  |  81 ++------------------
 builtin/rebase.c              |  50 +++++++++++++
 builtin/tag.c                 |   3 +-
 sequencer.c                   |  34 +++++++++
 sequencer.h                   |   4 +-
 t/meson.build                 |   1 +
 t/t3440-rebase-trailer.sh     | 134 ++++++++++++++++++++++++++++++++++
 trailer.c                     | 129 +++++++++++++++++++++++++++++---
 trailer.h                     |  13 +++-
 wrapper.c                     |  16 ++++
 wrapper.h                     |   6 ++
 13 files changed, 392 insertions(+), 90 deletions(-)
 create mode 100755 t/t3440-rebase-trailer.sh
-- 
2.51.0
Next: Li Chen
Message 1 of 24 in “rebase: support --trailer”
  1. 0/4 rebase: support --trailerLi Chen, Nov 5, 2025
  2. 1/4 interpret-trailers: factor out buffer-based processing to process_trailers()Li Chen, Nov 5, 2025
  3. Junio C HamanoNov 5, 2025
  4. Phillip WoodNov 10, 2025
  5. Li ChenNov 10, 2025
  6. Junio C HamanoNov 10, 2025
  7. Li ChenNov 10, 2025
  8. 2/4 trailer: move process_trailers to trailer.hLi Chen, Nov 5, 2025
  9. Junio C HamanoNov 5, 2025
  10. 3/4 trailer: append trailers in-process and drop the fork to `interpret-trailers`Li Chen, Nov 5, 2025
  11. Junio C HamanoNov 5, 2025
  12. Li ChenNov 10, 2025
  13. Phillip WoodNov 10, 2025
  14. Li ChenNov 10, 2025
  15. Li ChenFeb 24, 2026
  16. Phillip WoodNov 11, 2025
  17. 4/4 rebase: support --trailerLi Chen, Nov 5, 2025
  18. Phillip WoodNov 12, 2025
  19. Kristoffer HaugsbakkNov 24, 2025
  20. Junio C HamanoJan 20, 2026
  21. Junio C HamanoNov 5, 2025
  22. Li ChenNov 10, 2025
  23. Phillip WoodNov 12, 2025
  24. Li ChenNov 17, 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.