aboutsummaryrefslogtreecommitdiff
path: root/commit.h
diff options
context:
space:
mode:
authorRené Scharfe <l.s.r@web.de>2017-03-01 12:37:07 +0100
committerJunio C Hamano <gitster@pobox.com>2017-03-01 15:09:17 -0800
commit6d167fd7ccb84f07a0bd57d8e188a651e913b158 (patch)
tree73b2ac5bf9dd492b1b8112ababde2c2e16caac84 /commit.h
parent8ffc8dc6bab4cf3d2364dd54b2de6c3afdb48610 (diff)
downloadgit-6d167fd7ccb84f07a0bd57d8e188a651e913b158.tar.gz
git-6d167fd7ccb84f07a0bd57d8e188a651e913b158.tar.xz
pretty: use fmt_output_email_subject()
Add the email-style subject prefix (e.g. "Subject: [PATCH] ") directly when it's needed instead of letting log_write_email_headers() prepare it in a static buffer in advance. This simplifies storage ownership and code flow. Signed-off-by: Rene Scharfe <l.s.r@web.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'commit.h')
-rw-r--r--commit.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/commit.h b/commit.h
index afd14f318..e818aff07 100644
--- a/commit.h
+++ b/commit.h
@@ -142,21 +142,24 @@ static inline int cmit_fmt_is_mail(enum cmit_fmt fmt)
return (fmt == CMIT_FMT_EMAIL || fmt == CMIT_FMT_MBOXRD);
}
+struct rev_info; /* in revision.h, it circularly uses enum cmit_fmt */
+
struct pretty_print_context {
/*
* Callers should tweak these to change the behavior of pp_* functions.
*/
enum cmit_fmt fmt;
int abbrev;
- const char *subject;
const char *after_subject;
int preserve_subject;
struct date_mode date_mode;
unsigned date_mode_explicit:1;
+ int print_email_subject;
int expand_tabs_in_log;
int need_8bit_cte;
char *notes_message;
struct reflog_walk_info *reflog_info;
+ struct rev_info *rev;
const char *output_encoding;
struct string_list *mailmap;
int color;
@@ -175,7 +178,6 @@ struct userformat_want {
};
extern int has_non_ascii(const char *text);
-struct rev_info; /* in revision.h, it circularly uses enum cmit_fmt */
extern const char *logmsg_reencode(const struct commit *commit,
char **commit_encoding,
const char *output_encoding);