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>
This commit is contained in:
committed by
Junio C Hamano
parent
3ddad98b74
commit
c112f689c2
@ -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"))
|
||||
|
||||
Reference in New Issue
Block a user