]> git.ipfire.org Git - thirdparty/git.git/commit
builtin/commit: refactor --trailer logic
authorJohn Passaro <john.a.passaro@gmail.com>
Sun, 5 May 2024 18:49:09 +0000 (18:49 +0000)
committerJunio C Hamano <gitster@pobox.com>
Tue, 7 May 2024 17:06:03 +0000 (10:06 -0700)
commit4a8618785e3df20287d4c18707118d34581a298b
tree965102e28480df653b4311919178f9a440f284d2
parent56740f9910218a03374b5e410b3a2d204d7c33ed
builtin/commit: refactor --trailer logic

git-commit adds user trailers to the commit message by passing its
`--trailer` arguments to a child process running `git-interpret-trailers
--in-place`. This logic is broadly useful, not just for git-commit but
for other commands constructing message bodies (e.g. git-tag).

Let's move this logic from git-commit to a new function in the trailer
API, so that it can be re-used in other commands.

Helped-by: Patrick Steinhardt <ps@pks.im>
Helped-by: Junio C Hamano <gitster@pobox.com>
Signed-off-by: John Passaro <john.a.passaro@gmail.com>
Acked-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/commit.c
trailer.c
trailer.h