Re: [PATCH 0/5] make interpret-trailers useful for parsing
From: Jacob Keller <hidden>
Date: 2017-08-10 07:05:16
On Wed, Aug 9, 2017 at 10:19 AM, Junio C Hamano [off-list ref] wrote:
Jeff King [off-list ref] writes:quoted
Parsing trailers out of a commit message is _mostly_ easy, but there area a lot of funny corner cases (e.g., heuristics for how many non-trailers must be present before a final paragraph isn't a trailer block anymore). The code in trailer.c already knows about these corner cases, but there's no way to access it from the command line. This series teaches interpret-trailers to parse and output just the trailers. So now you can do: $ git log --format=%B -1 8d44797cc91231cd44955279040dc4a1ee0a797f | git interpret-trailers --parse Signed-off-by: Hartmut Henkel [off-list ref] Helped-by: Stefan Beller [off-list ref] Signed-off-by: Ralf Thielow [off-list ref] Acked-by: Matthias Rüster [off-list ref]Thank-you, thank-you, thank-you. The above example made me wonder if we also want a format specifier to do the above without piping, but it turns out that we already have "log --format=%(trailers)", so we are good ;-)
I was going to say, I thought we had a way to get trailers for a commit via the pretty format, since that is what i used in the past. Thanks, Jake