Re: [PATCH 0/5] make interpret-trailers useful for parsing
- From
Jacob Keller <jacob.keller@gmail.com>
- Date
- Aug 10, 2017, 07:04 UTC
- Message-ID
- <CA+P7+xoifkJyH34Q0NJdE_=UzWK1SA+2gwyXrHpF7Sv2PBHATQ@mail.gmail.com>
- In-Reply-To
- <xmqq60dw7j5u.fsf@gitster.mtv.corp.google.com>
On Wed, Aug 9, 2017 at 10:19 AM, Junio C Hamano <gitster@pobox.com> wrote:
Show 24 quoted lines
> Jeff King <peff@peff.net> writes: > >> 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 <henkel@vh-s.de> >> Helped-by: Stefan Beller <sbeller@google.com> >> Signed-off-by: Ralf Thielow <ralf.thielow@gmail.com> >> Acked-by: Matthias Rüster <matthias.ruester@gmail.com> > > 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