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 --- builtin-log.c | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) (limited to 'builtin-log.c') diff --git a/builtin-log.c b/builtin-log.c index 1c9f7d02a8..865832c85e 100644 --- a/builtin-log.c +++ b/builtin-log.c @@ -482,10 +482,22 @@ int cmd_format_patch(int argc, const char **argv, const char *prefix) memcpy(add_signoff, committer, endpos - committer + 1); add_signoff[endpos - committer + 1] = 0; } - else if (!strcmp(argv[i], "--attach")) + else if (!strcmp(argv[i], "--attach")) { rev.mime_boundary = git_version_string; - else if (!prefixcmp(argv[i], "--attach=")) + rev.no_inline = 1; + } + else if (!prefixcmp(argv[i], "--attach=")) { + rev.mime_boundary = argv[i] + 9; + rev.no_inline = 1; + } + else if (!strcmp(argv[i], "--inline")) { + rev.mime_boundary = git_version_string; + rev.no_inline = 0; + } + else if (!prefixcmp(argv[i], "--inline=")) { rev.mime_boundary = argv[i] + 9; + rev.no_inline = 0; + } else if (!strcmp(argv[i], "--ignore-if-in-upstream")) ignore_if_in_upstream = 1; else if (!strcmp(argv[i], "--thread")) -- cgit v1.2.3