blob: 94978e2c838ce98bdd442006b942cce38e2ef6c8 [file] [log] [blame]
Junio C Hamano5f1c3f02006-04-09 01:11:11 -07001#ifndef LOG_TREE_H
2#define LOG_TREE_H
3
Elijah Newren0fd2e212023-05-16 06:33:58 +00004struct rev_info;
Junio C Hamano5f1c3f02006-04-09 01:11:11 -07005
Linus Torvalds91539832006-04-17 11:59:32 -07006struct log_info {
7 struct commit *commit, *parent;
8};
9
Rafael Ascensão65516f52017-11-21 21:33:41 +000010struct decoration_filter {
Derrick Stoleea6be5e62020-04-16 14:15:49 +000011 struct string_list *include_ref_pattern;
12 struct string_list *exclude_ref_pattern;
13 struct string_list *exclude_ref_config_pattern;
Rafael Ascensão65516f52017-11-21 21:33:41 +000014};
15
Andy Koppea3883a62023-08-20 19:50:04 +010016struct decoration_options {
17 char *prefix;
18 char *suffix;
19 char *separator;
Andy Koppef1f8a252023-08-20 19:50:08 +010020 char *pointer;
21 char *tag;
Andy Koppea3883a62023-08-20 19:50:04 +010022};
23
Jonathan Nieder88521172014-10-07 15:16:57 -040024int parse_decorate_color_config(const char *var, const char *slot_name, const char *value);
Linus Torvaldscd2bdc52006-04-14 16:52:13 -070025int log_tree_diff_flush(struct rev_info *);
26int log_tree_commit(struct rev_info *, struct commit *);
Adam Simpkins02865652008-04-29 01:32:59 -070027void show_log(struct rev_info *opt);
Andy Koppea3883a62023-08-20 19:50:04 +010028void format_decorations(struct strbuf *sb, const struct commit *commit,
29 int use_color, const struct decoration_options *opts);
Linus Torvalds0f3a2902008-10-27 12:51:59 -070030void show_decorations(struct rev_info *opt, struct commit *commit);
Stephen Boyd108dab22009-03-22 19:14:05 -070031void log_write_email_headers(struct rev_info *opt, struct commit *commit,
Jeff King305a6812024-03-19 20:35:33 -040032 char **extra_headers_p,
brian m. carlson50cd54e2018-05-02 02:20:52 +000033 int *need_8bit_cte_p,
34 int maybe_multipart);
Rafael Ascensão65516f52017-11-21 21:33:41 +000035void load_ref_decorations(struct decoration_filter *filter, int flags);
Junio C Hamano5f1c3f02006-04-09 01:11:11 -070036
Junio C Hamanod28b5d42012-12-21 22:06:01 -080037void fmt_output_commit(struct strbuf *, struct commit *, struct rev_info *);
38void fmt_output_subject(struct strbuf *, const char *subject, struct rev_info *);
René Scharfe8ffc8dc2017-03-01 12:36:38 +010039void fmt_output_email_subject(struct strbuf *, struct rev_info *);
Stephen Boyd6fa8e622009-03-22 19:14:04 -070040
Junio C Hamano5f1c3f02006-04-09 01:11:11 -070041#endif