mirror of
https://github.com/git/git.git
synced 2026-01-09 17:46:37 +00:00
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>
This commit is contained in:
committed by
Junio C Hamano
parent
cf8899d285
commit
8abc89800c
10
trailer.h
10
trailer.h
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user