builtin/tag: add --trailer option
commit066cef770713026f33bb548885e3d6f66323c1f5
authorJohn Passaro <john.a.passaro@gmail.com>
Sun, 5 May 2024 18:49:10 +0000 (5 18:49 +0000)
committerJunio C Hamano <gitster@pobox.com>
Tue, 7 May 2024 17:06:03 +0000 (7 10:06 -0700)
tree21975e0812ccef4a73f0434576e85b849ce8524a
parent4a8618785e3df20287d4c18707118d34581a298b
builtin/tag: add --trailer option

git-tag supports interpreting trailers from an annotated tag message,
using --list --format="%(trailers)". However, the available methods to
add a trailer to a tag message (namely -F or --editor) are not as
ergonomic.

In a previous patch, we moved git-commit's implementation of its
--trailer option to the trailer.h API. Let's use that new function to
teach git-tag the same --trailer option, emulating as much of
git-commit's behavior as much as possible.

Helped-by: Patrick Steinhardt <ps@pks.im>
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>
Documentation/git-tag.txt
builtin/tag.c
t/t7004-tag.sh