From: Phillip Wood Date: Wed, 12 Nov 2025 14:50:27 GMT Subject: Re: [PATCH v6 0/4] rebase: support --trailer Message-ID: In-Reply-To: <20251105142944.73061-1-me@linux.beauty> Hi Li On 05/11/2025 14:29, Li Chen wrote: > From: Li Chen > > 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). I've left quite a few comments but overall this is looking much better now, it needs a bit of cleaning up but I didn't spot any major issues. Thanks for working on it Phillip > 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 >