]> git.ipfire.org Git - thirdparty/git.git/blame - trailer.h
interpret-trailers: add --parse convenience option
[thirdparty/git.git] / trailer.h
CommitLineData
b1d78d77
CC
1#ifndef TRAILER_H
2#define TRAILER_H
3
e8c352c3
JT
4struct trailer_info {
5 /*
6 * True if there is a blank line before the location pointed to by
7 * trailer_start.
8 */
9 int blank_line_before_trailer;
10
11 /*
12 * Pointers to the start and end of the trailer block found. If there
13 * is no trailer block found, these 2 pointers point to the end of the
14 * input string.
15 */
16 const char *trailer_start, *trailer_end;
17
18 /*
19 * Array of trailers found.
20 */
21 char **trailers;
22 size_t trailer_nr;
23};
24
8abc8980
JK
25struct process_trailer_options {
26 int in_place;
27 int trim_empty;
56c493ed 28 int only_trailers;
fdbdb64f 29 int only_input;
00002396 30 int unfold;
8abc8980
JK
31};
32
33#define PROCESS_TRAILER_OPTIONS_INIT {0}
34
35void process_trailers(const char *file,
36 const struct process_trailer_options *opts,
e1f89863 37 struct string_list *trailers);
b1d78d77 38
e8c352c3
JT
39void trailer_info_get(struct trailer_info *info, const char *str);
40
41void trailer_info_release(struct trailer_info *info);
42
b1d78d77 43#endif /* TRAILER_H */