blob: 8fa79289ec6b6cb27e68534845d345caf40137ea [file] [log] [blame]
Junio C Hamano5f1c3f02006-04-09 01:11:11 -07001#ifndef LOG_TREE_H
2#define LOG_TREE_H
3
Linus Torvaldscd2bdc52006-04-14 16:52:13 -07004#include "revision.h"
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
Jonathan Nieder88521172014-10-07 15:16:57 -040016int parse_decorate_color_config(const char *var, const char *slot_name, const char *value);
Linus Torvaldscd2bdc52006-04-14 16:52:13 -070017void init_log_tree_opt(struct rev_info *);
18int log_tree_diff_flush(struct rev_info *);
19int log_tree_commit(struct rev_info *, struct commit *);
20int log_tree_opt_parse(struct rev_info *, const char **, int);
Adam Simpkins02865652008-04-29 01:32:59 -070021void show_log(struct rev_info *opt);
Harry Jeffery92710952014-09-18 21:53:53 +010022void format_decorations_extended(struct strbuf *sb, const struct commit *commit,
23 int use_color,
24 const char *prefix,
25 const char *separator,
26 const char *suffix);
27#define format_decorations(strbuf, commit, color) \
28 format_decorations_extended((strbuf), (commit), (color), " (", ", ", ")")
Linus Torvalds0f3a2902008-10-27 12:51:59 -070029void show_decorations(struct rev_info *opt, struct commit *commit);
Stephen Boyd108dab22009-03-22 19:14:05 -070030void log_write_email_headers(struct rev_info *opt, struct commit *commit,
Junio C Hamano267123b2008-03-15 00:09:20 -070031 const char **extra_headers_p,
brian m. carlson50cd54e2018-05-02 02:20:52 +000032 int *need_8bit_cte_p,
33 int maybe_multipart);
Rafael Ascensão65516f52017-11-21 21:33:41 +000034void load_ref_decorations(struct decoration_filter *filter, int flags);
Junio C Hamano5f1c3f02006-04-09 01:11:11 -070035
Stephen Boyd6fa8e622009-03-22 19:14:04 -070036#define FORMAT_PATCH_NAME_MAX 64
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