pretty: allow showing specific trailers

Adds a new "key=X" option to "%(trailers)" which will cause it to only
print trailer lines which match any of the specified keys.

Signed-off-by: Anders Waldenborg <anders@0x63.nu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Anders Waldenborg
2019-01-28 22:33:34 +01:00
committed by Junio C Hamano
parent 3e3f347819
commit 250bea0c16
5 changed files with 107 additions and 6 deletions

View File

@@ -72,6 +72,8 @@ struct process_trailer_options {
int only_input;
int unfold;
int no_divider;
int (*filter)(const struct strbuf *, void *);
void *filter_data;
};
#define PROCESS_TRAILER_OPTIONS_INIT {0}