From c112f689c2c4dfbf2e4dca0e91aa527dd96ab333 Mon Sep 17 00:00:00 2001 From: Johannes Schindelin Date: Sun, 4 Mar 2007 00:12:06 +0100 Subject: format-patch: add --inline option and make --attach a true attachment The existing --attach option did not create a true "attachment" but multipart/mixed with Content-Disposition: inline. It should have been with Content-Disposition: attachment. Introduce --inline to add multipart/mixed that is inlined, and make --attach to create an attachement. Signed-off-by: Johannes Schindelin Signed-off-by: Junio C Hamano --- log-tree.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'log-tree.c') diff --git a/log-tree.c b/log-tree.c index 6ce239d8f9..7b3ad7d5f0 100644 --- a/log-tree.c +++ b/log-tree.c @@ -205,10 +205,12 @@ void show_log(struct rev_info *opt, const char *sep) "Content-Type: text/x-patch;\n" " name=\"%s.diff\"\n" "Content-Transfer-Encoding: 8bit\n" - "Content-Disposition: inline;\n" + "Content-Disposition: %s;\n" " filename=\"%s.diff\"\n\n", mime_boundary_leader, opt->mime_boundary, - sha1, sha1); + sha1, + opt->no_inline ? "attachment" : "inline", + sha1); opt->diffopt.stat_sep = buffer; } } else if (opt->commit_format != CMIT_FMT_USERFORMAT) { -- cgit v1.3-5-g9baa