diff options
author | Jeff King <peff@peff.net> | 2017-08-10 14:03:58 -0400 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2017-08-10 12:41:25 -0700 |
commit | 8abc89800c09cda7910c2211ebbbbb95a3008b63 (patch) | |
tree | 5b44f9610fdcc743b0bf5257a072ff2477757797 /trailer.h | |
parent | cf8899d285d2648013040ec7196ffd3de0606664 (diff) | |
download | git-8abc89800c09cda7910c2211ebbbbb95a3008b63.tar.gz |
trailer: put process_trailers() options into a struct
We already have two options and are about to add a few more.
To avoid having a huge number of boolean arguments, let's
convert to an options struct which can be passed in.
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'trailer.h')
-rw-r--r-- | trailer.h | 10 |
1 files changed, 9 insertions, 1 deletions
@@ -22,7 +22,15 @@ struct trailer_info { size_t trailer_nr; }; -void process_trailers(const char *file, int in_place, int trim_empty, +struct process_trailer_options { + int in_place; + int trim_empty; +}; + +#define PROCESS_TRAILER_OPTIONS_INIT {0} + +void process_trailers(const char *file, + const struct process_trailer_options *opts, struct string_list *trailers); void trailer_info_get(struct trailer_info *info, const char *str); |