On Wed, Aug 09, 2017 at 08:21:47AM -0400, Jeff King wrote:
> 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 <[email protected]>
> Helped-by: Stefan Beller <[email protected]>
> Signed-off-by: Ralf Thielow <[email protected]>
> Acked-by: Matthias RĂ¼ster <[email protected]>
And here's a v2 that addresses all of the comments except one: Stefan
suggested that --only-existing wasn't a great name. I agree, but I like
everything else less.
Summary:
- opts arguments are now const
- tests that depend on the value of trailer.sign.command now set it
explicitly
- the arg_head variable is now moved into the conditional block whewre
it's used
- the interpret-trailers manpage has been updated in patch 5 to make
it clear that "add" and "parse" are the two major modes
[1/5]: trailer: put process_trailers() options into a struct
[2/5]: interpret-trailers: add an option to show only the trailers
[3/5]: interpret-trailers: add an option to show only existing trailers
[4/5]: interpret-trailers: add an option to normalize output
[5/5]: interpret-trailers: add --parse convenience option
Documentation/git-interpret-trailers.txt | 34 +++++++++++---
builtin/interpret-trailers.c | 34 +++++++++++---
t/t7513-interpret-trailers.sh | 76 ++++++++++++++++++++++++++++++++
trailer.c | 68 ++++++++++++++++++++++------
trailer.h | 13 +++++-
5 files changed, 196 insertions(+), 29 deletions(-)
-Peff