Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohannes Schindelin <Johannes.Schindelin@gmx.de>2007-03-04 02:12:06 +0300
committerJunio C Hamano <junkio@cox.net>2007-03-05 04:31:29 +0300
commitc112f689c2c4dfbf2e4dca0e91aa527dd96ab333 (patch)
tree4a7af06284f04f72986d773f8d29f904707996b3 /builtin-log.c
parent3ddad98b74924d76116d05e7601ab1e163d68500 (diff)
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 'builtin-log.c')
-rw-r--r--builtin-log.c16
1 files changed, 14 insertions, 2 deletions
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"))