summaryrefslogtreecommitdiff
path: root/log-tree.c
diff options
context:
space:
mode:
authorJohannes Schindelin <Johannes.Schindelin@gmx.de>2007-03-04 00:12:06 +0100
committerJunio C Hamano <junkio@cox.net>2007-03-04 17:31:29 -0800
commitc112f689c2c4dfbf2e4dca0e91aa527dd96ab333 (patch)
tree4a7af06284f04f72986d773f8d29f904707996b3 /log-tree.c
parent3ddad98b74924d76116d05e7601ab1e163d68500 (diff)
downloadgit-c112f689c2c4dfbf2e4dca0e91aa527dd96ab333.tar.gz
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 <Johannes.Schindelin@gmx.de> Signed-off-by: Junio C Hamano <junkio@cox.net>
Diffstat (limited to 'log-tree.c')
-rw-r--r--log-tree.c6
1 files changed, 4 insertions, 2 deletions
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) {