interpret-trailers: add an option to show only existing trailers

It can be useful to invoke interpret-trailers for the
primary purpose of parsing existing trailers. But in that
case, we don't want to apply existing ifMissing or ifExists
rules from the config. Let's add a special mode where we
avoid applying those rules. Coupled with --only-trailers,
this gives us a reasonable parsing tool.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Jeff King
2017-08-15 06:23:25 -04:00
committed by Junio C Hamano
parent 56c493ed1b
commit fdbdb64f49
5 changed files with 34 additions and 4 deletions

View File

@@ -26,6 +26,7 @@ struct process_trailer_options {
int in_place;
int trim_empty;
int only_trailers;
int only_input;
};
#define PROCESS_TRAILER_OPTIONS_INIT {0}