]> git.ipfire.org Git - thirdparty/git.git/commit - trailer.c
interpret-trailers: add an option to show only the trailers
authorJeff King <peff@peff.net>
Tue, 15 Aug 2017 10:23:21 +0000 (06:23 -0400)
committerJunio C Hamano <gitster@pobox.com>
Tue, 15 Aug 2017 18:13:58 +0000 (11:13 -0700)
commit56c493ed1b9c067813fb95ff7cd4f69c7c1d2e36
tree44ddaa8efbb61e13812138830ea2137de66304ea
parent8abc89800c09cda7910c2211ebbbbb95a3008b63
interpret-trailers: add an option to show only the trailers

In theory it's easy for any reader who wants to parse
trailers to do so. But there are a lot of subtle corner
cases around what counts as a trailer, when the trailer
block begins and ends, etc. Since interpret-trailers already
has our parsing logic, let's let callers ask it to just
output the trailers.

They still have to parse the "key: value" lines, but at
least they can ignore all of the other corner cases.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Documentation/git-interpret-trailers.txt
builtin/interpret-trailers.c
t/t7513-interpret-trailers.sh
trailer.c
trailer.h