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

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

From
Junio C Hamano <gitster@pobox.com>
Date
Nov 5, 2025, 16:30 UTC
Message-ID
<xmqqecqcmohf.fsf@gitster.g>
In-Reply-To
<20251105142944.73061-1-me@linux.beauty>
Li Chen <me@linux.beauty> writes:
> 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. 

This description makes it sound as if the code before this patch series drove "interpret-trailers" via fork/exec and tempfile juggling. And that contradicts the title of the topic, "rebase: support --trailer", which implies that the topic is about the "git rebase" command, and that "git rebase" before this patch series did not support trailers, not even with fork/exec and tempfile juggling.

Which is it?

I see trailer.c:amend_file_with_trailers() does fork out to the "git interpret-trailers" command and is called by "git commit" and "git tag". Perhaps you are updating the amend_file_with_trailers() helper function to do the in-process thing, so that "git commit" and "git tag" no longer needs fork/exec and tempfile juggling?

That would be great, regardless of "rebase", and if you used that updated helper function to teach "rebase" to deal with trailers in-process, that would be wonderful.

If the main part of the series (i.e. [1/4]-[4/4]) needs rerolling, could you be a bit more careful when writing the cover letter to make it easier for even those who are seeing this series for the first time to understand what is going on?

> The first
> three commits centralize logic to reduce overhead and simplify error handling.

... in what code paths? "In command X and Y where they do Z", "All the call flows that lead to helper function F by eliminating the need to do G that is costly and replacing it with H", etc., is what I would expect to see in such a description.

> The final commit adds git rebase --trailer, currently supported
> with the merge backend only (rejecting apply-only scenarios and
> validating input early).

Sounds sensible. Li Chen <me@linux.beauty> writes:

Previous: Junio C HamanoNext: Li Chen
Message 21 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.