summaryrefslogtreecommitdiff
path: root/log-tree.c
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <junkio@cox.net>2006-06-02 13:50:31 -0700
committerLibravatar Junio C Hamano <junkio@cox.net>2006-06-02 13:50:31 -0700
commit283d3184dfe1c4053470ab2b6bfc8250d130e0bb (patch)
treee2e5af328e471b2a9f24ddcb9c0366bc6d5ee30e /log-tree.c
parentMerge branch 'master' into next (diff)
parentformat-patch: resurrect extra headers from config (diff)
downloadtgif-283d3184dfe1c4053470ab2b6bfc8250d130e0bb.tar.xz
Merge branch 'jc/fmt-patch' into next
* jc/fmt-patch: format-patch: resurrect extra headers from config
Diffstat (limited to 'log-tree.c')
-rw-r--r--log-tree.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/log-tree.c b/log-tree.c
index e86e16bcad..ebb49f2970 100644
--- a/log-tree.c
+++ b/log-tree.c
@@ -51,7 +51,7 @@ void show_log(struct rev_info *opt, struct log_info *log, const char *sep)
int abbrev_commit = opt->abbrev_commit ? opt->abbrev : 40;
const char *extra;
int len;
- char *subject = NULL, *after_subject = NULL;
+ const char *subject = NULL, *extra_headers = opt->extra_headers;
opt->loginfo = NULL;
if (!opt->verbose_header) {
@@ -100,6 +100,7 @@ void show_log(struct rev_info *opt, struct log_info *log, const char *sep)
static char subject_buffer[1024];
static char buffer[1024];
snprintf(subject_buffer, sizeof(subject_buffer) - 1,
+ "%s"
"MIME-Version: 1.0\n"
"Content-Type: multipart/mixed;\n"
" boundary=\"%s%s\"\n"
@@ -110,9 +111,10 @@ void show_log(struct rev_info *opt, struct log_info *log, const char *sep)
"Content-Type: text/plain; "
"charset=UTF-8; format=fixed\n"
"Content-Transfer-Encoding: 8bit\n\n",
+ extra_headers ? extra_headers : "",
mime_boundary_leader, opt->mime_boundary,
mime_boundary_leader, opt->mime_boundary);
- after_subject = subject_buffer;
+ extra_headers = subject_buffer;
snprintf(buffer, sizeof(buffer) - 1,
"--%s%s\n"
@@ -141,7 +143,7 @@ void show_log(struct rev_info *opt, struct log_info *log, const char *sep)
/*
* And then the pretty-printed message itself
*/
- len = pretty_print_commit(opt->commit_format, commit, ~0u, this_header, sizeof(this_header), abbrev, subject, after_subject);
+ len = pretty_print_commit(opt->commit_format, commit, ~0u, this_header, sizeof(this_header), abbrev, subject, extra_headers);
if (opt->add_signoff)
len = append_signoff(this_header, sizeof(this_header), len,