10 CMIT_FMT_DEFAULT
= CMIT_FMT_MEDIUM
,
22 struct pretty_print_context
{
24 * Callers should tweak these to change the behavior of pp_* functions.
28 const char *after_subject
;
30 struct date_mode date_mode
;
31 unsigned date_mode_explicit
:1;
32 int print_email_subject
;
33 int expand_tabs_in_log
;
36 struct reflog_walk_info
*reflog_info
;
38 const char *output_encoding
;
39 struct string_list
*mailmap
;
41 struct ident_split
*from_ident
;
44 * Fields below here are manipulated internally by pp_* functions and
45 * should not be counted on by callers.
47 struct string_list in_body_headers
;
51 static inline int cmit_fmt_is_mail(enum cmit_fmt fmt
)
53 return (fmt
== CMIT_FMT_EMAIL
|| fmt
== CMIT_FMT_MBOXRD
);
56 struct userformat_want
{
60 void userformat_find_requirements(const char *fmt
, struct userformat_want
*w
);
61 void pp_commit_easy(enum cmit_fmt fmt
, const struct commit
*commit
,
63 void pp_user_info(struct pretty_print_context
*pp
, const char *what
,
64 struct strbuf
*sb
, const char *line
,
65 const char *encoding
);
66 void pp_title_line(struct pretty_print_context
*pp
, const char **msg_p
,
67 struct strbuf
*sb
, const char *encoding
,
69 void pp_remainder(struct pretty_print_context
*pp
, const char **msg_p
,
70 struct strbuf
*sb
, int indent
);
72 void format_commit_message(const struct commit
*commit
,
73 const char *format
, struct strbuf
*sb
,
74 const struct pretty_print_context
*context
);
76 void get_commit_format(const char *arg
, struct rev_info
*);
78 void pretty_print_commit(struct pretty_print_context
*pp
,
79 const struct commit
*commit
,
82 const char *format_subject(struct strbuf
*sb
, const char *msg
,
83 const char *line_separator
);
85 int commit_format_is_empty(enum cmit_fmt
);