{"thread":{"id":"7073","subject":"Creating attachments using git-format-patch","startedAt":"2007-03-03T21:07:26Z","lastAt":"2007-03-05T00:09:52Z","messageCount":12,"participants":["Panagiotis Issaris","Junio C Hamano","Johannes Schindelin"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"36207","messageId":"loom.20070303T215950-974@post.gmane.org","threadId":"7073","inReplyTo":null,"subject":"Creating attachments using git-format-patch","fromName":"Panagiotis Issaris","fromEmail":"takis.issaris@uhasselt.be","sentAt":"2007-03-03T21:07:26Z","receivedAt":"2007-03-03T21:07:26Z","isPatch":false,"sender":{"key":"takis.issaris@uhasselt.be","avatar":null},"body":"Hi,\n\nI've been trying to start using git-format-patch together with git-send-email,\nbut I've encountered some problems. The mailinglist I want to send the patches\nto, requires patches to be sent as attachments. So, I tried using the --attach\noption of git-format-patch.\nHowever its output does not seem to generate output which Thunderbird or Mutt\nrecognize as attachments. Has anyone noticed similar problems or am I using it\nincorrectly?\n\nI'm doing it as follows:\ntakis@poseidon:/usr/local/src/ffmpeg-pi$ git-format-patch --attach HEAD^\n0001-Modify-av_pkt_dump-and-av_hex_dump-to-be-av_logish.patch\ntakis@poseidon:/usr/local/src/ffmpeg-pi$ git-send-email\n0001-Modify-av_pkt_dump-and-av_hex_dump-to-be-av_logish.patch\n\n\nMutt shows a message containing:\nThis is a multi-part message in MIME format.\n--------------1.5.0.1.226.g7bd59\nContent-Type: text/plain; charset=UTF-8; format=fixed\nContent-Transfer-Encoding: 8bit\n...\n--------------1.5.0.1.226.g7bd59\nContent-Type: text/x-patch;\n name=\"514f2915144861b6d69ef54bd8d392aa8b3a00e6.diff\"\nContent-Transfer-Encoding: 8bit\nContent-Disposition: inline;\n filename=\"514f2915144861b6d69ef54bd8d392aa8b3a00e6.diff\"\n...\n\nBut it does not look like an attachment. Same happens when reading the email\nwith Thunderbird: everything appears inline.\n\nAny suggestions?\n\nWith friendly regards,\nTakis\n"},{"id":"36215","messageId":"7vhct27xk2.fsf@assigned-by-dhcp.cox.net","threadId":"7073","inReplyTo":"loom.20070303T215950-974@post.gmane.org","subject":"Re: Creating attachments using git-format-patch","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2007-03-03T22:49:01Z","receivedAt":"2007-03-03T22:49:01Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Panagiotis Issaris <takis.issaris@uhasselt.be> writes:\n\n> I've been trying to start using git-format-patch together with\n> git-send-email, but I've encountered some problems. The\n> mailinglist I want to send the patches to, requires patches to\n> be sent as attachments. So, I tried using the --attach option\n> of git-format-patch.\n\nStrictly speaking, I think --attach option is misnamed.  It's\nsole purpose is to create a multipart/mixed whose first part is\nthe commit log message and the second part is the patch text to\nhelp cases where the patch text is not UTF-8 but the log message\nis.\n\nWe mark the second part inline because it is easier to review if\nthe patch is shown inline in MUA.\n\nFor now, I think you could edit \"inline;\" to \"attachment;\".\n\nWe could introduce a new option \"--inline\" that does what the\ncurrent \"--attach\" does, and make \"--attach\" write \"attachment;\"\ninstead of \"inline;\" there, but that changes the behaviour, and\npeople who are used to use \"--attach\" to send out patches to\nmailing lists suddenly start sending more cumbersome-to-read\nvariant, so...\n"},{"id":"36217","messageId":"Pine.LNX.4.63.0703032356050.22628@wbgn013.biozentrum.uni-wuerzburg.de","threadId":"7073","inReplyTo":"7vhct27xk2.fsf@assigned-by-dhcp.cox.net","subject":"Re: Creating attachments using git-format-patch","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2007-03-03T22:56:35Z","receivedAt":"2007-03-03T22:56:35Z","isPatch":false,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi,\n\nOn Sat, 3 Mar 2007, Junio C Hamano wrote:\n\n> We could introduce a new option \"--inline\" that does what the\n> current \"--attach\" does, and make \"--attach\" write \"attachment;\"\n> instead of \"inline;\" there, but that changes the behaviour, and\n> people who are used to use \"--attach\" to send out patches to\n> mailing lists suddenly start sending more cumbersome-to-read\n> variant, so...\n\n... so we should introduce an option \"--no-inline\"!\n\nCiao,\nDscho\n"},{"id":"36218","messageId":"Pine.LNX.4.63.0703040010100.22628@wbgn013.biozentrum.uni-wuerzburg.de","threadId":"7073","inReplyTo":"Pine.LNX.4.63.0703032356050.22628@wbgn013.biozentrum.uni-wuerzburg.de","subject":"[PATCH] format-patch: add --no-inline option","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2007-03-03T23:12:06Z","receivedAt":"2007-03-03T23:12:06Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"\nSome projects have a \"patches are not to be inlined\" policy. Support\nthese by adding an option to turn off inlined attachments.\n\nSigned-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de>\n\n---\n\n\tOn Sat, 3 Mar 2007, Johannes Schindelin wrote:\n\n\t> ... so we should introduce an option \"--no-inline\"!\n\n\tI.e. something like this. If you want this, I leave it to you to \n\tadd a config variable to set the default (but then, you have to \n\tadd an option \"--inline\", too!).\n\n builtin-log.c |    2 ++\n log-tree.c    |    6 ++++--\n revision.h    |    1 +\n 3 files changed, 7 insertions(+), 2 deletions(-)\n\ndiff --git a/builtin-log.c b/builtin-log.c\nindex 1c9f7d0..3b73feb 100644\n--- a/builtin-log.c\n+++ b/builtin-log.c\n@@ -486,6 +486,8 @@ int cmd_format_patch(int argc, const char **argv, const char *prefix)\n \t\t\trev.mime_boundary = git_version_string;\n \t\telse if (!prefixcmp(argv[i], \"--attach=\"))\n \t\t\trev.mime_boundary = argv[i] + 9;\n+\t\telse if (!strcmp(argv[i], \"--no-inline\"))\n+\t\t\trev.no_inline = 1;\n \t\telse if (!strcmp(argv[i], \"--ignore-if-in-upstream\"))\n \t\t\tignore_if_in_upstream = 1;\n \t\telse if (!strcmp(argv[i], \"--thread\"))\ndiff --git a/log-tree.c b/log-tree.c\nindex 6ce239d..7b3ad7d 100644\n--- a/log-tree.c\n+++ b/log-tree.c\n@@ -205,10 +205,12 @@ void show_log(struct rev_info *opt, const char *sep)\n \t\t\t\t \"Content-Type: text/x-patch;\\n\"\n \t\t\t\t \" name=\\\"%s.diff\\\"\\n\"\n \t\t\t\t \"Content-Transfer-Encoding: 8bit\\n\"\n-\t\t\t\t \"Content-Disposition: inline;\\n\"\n+\t\t\t\t \"Content-Disposition: %s;\\n\"\n \t\t\t\t \" filename=\\\"%s.diff\\\"\\n\\n\",\n \t\t\t\t mime_boundary_leader, opt->mime_boundary,\n-\t\t\t\t sha1, sha1);\n+\t\t\t\t sha1,\n+\t\t\t\t opt->no_inline ? \"attachment\" : \"inline\",\n+\t\t\t\t sha1);\n \t\t\topt->diffopt.stat_sep = buffer;\n \t\t}\n \t} else if (opt->commit_format != CMIT_FMT_USERFORMAT) {\ndiff --git a/revision.h b/revision.h\nindex 5fec184..cf33713 100644\n--- a/revision.h\n+++ b/revision.h\n@@ -74,6 +74,7 @@ struct rev_info {\n \tconst char\t*add_signoff;\n \tconst char\t*extra_headers;\n \tconst char\t*log_reencode;\n+\tint\t\tno_inline;\n \n \t/* Filter by commit log message */\n \tstruct grep_opt\t*grep_filter;\n"},{"id":"36225","messageId":"7vslcl7jxo.fsf@assigned-by-dhcp.cox.net","threadId":"7073","inReplyTo":"Pine.LNX.4.63.0703032356050.22628@wbgn013.biozentrum.uni-wuerzburg.de","subject":"Re: Creating attachments using git-format-patch","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2007-03-04T03:43:15Z","receivedAt":"2007-03-04T03:43:15Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:\n\n> On Sat, 3 Mar 2007, Junio C Hamano wrote:\n>\n>> We could introduce a new option \"--inline\" that does what the\n>> current \"--attach\" does, and make \"--attach\" write \"attachment;\"\n>> instead of \"inline;\" there, but that changes the behaviour, and\n>> people who are used to use \"--attach\" to send out patches to\n>> mailing lists suddenly start sending more cumbersome-to-read\n>> variant, so...\n>\n> ... so we should introduce an option \"--no-inline\"!\n\nYes, but this time around I _think_ we should admit that the\ncurrent option is misnamed and make it right.\n"},{"id":"36226","messageId":"7vmz2t7i1x.fsf@assigned-by-dhcp.cox.net","threadId":"7073","inReplyTo":"7vslcl7jxo.fsf@assigned-by-dhcp.cox.net","subject":"Re: Creating attachments using git-format-patch","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2007-03-04T04:23:54Z","receivedAt":"2007-03-04T04:23:54Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"From: Johannes Schindelin <Johannes.Schindelin@gmx.de>\nDate: Sun, 4 Mar 2007 00:12:06 +0100\nSubject: [PATCH] format-patch: add --inline option and make --attach a true attachment\n\nThe existing --attach option did not create a true \"attachment\"\nbut multipart/mixed with Content-Disposition: inline.  It should\nhave been with Content-Disposition: attachment.\n\nIntroduce --inline to add multipart/mixed that is inlined, and\nmake --attach to create an attachement.\n\nHopefully-Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de>\nSigned-off-by: Junio C Hamano <junkio@cox.net>\n---\n\n Junio C Hamano <junkio@cox.net> writes:\n\n > Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:\n >\n >> ... so we should introduce an option \"--no-inline\"!\n >\n > Yes, but this time around I _think_ we should admit that the\n > current option is misnamed and make it right.\n\n * I do not think existing users care too deeply, as a patch as\n   an attachment has always been frowned upon in kernel and git\n   mailing list _anyway_, even if they were inlined.\n\n Documentation/git-format-patch.txt |   14 +++++++++++---\n builtin-log.c                      |   16 ++++++++++++++--\n log-tree.c                         |    6 ++++--\n revision.h                         |    1 +\n 4 files changed, 30 insertions(+), 7 deletions(-)\n\ndiff --git a/Documentation/git-format-patch.txt b/Documentation/git-format-patch.txt\nindex 59f34b9..dfdb652 100644\n--- a/Documentation/git-format-patch.txt\n+++ b/Documentation/git-format-patch.txt\n@@ -9,7 +9,8 @@ git-format-patch - Prepare patches for e-mail submission\n SYNOPSIS\n --------\n [verse]\n-'git-format-patch' [-n | -k] [-o <dir> | --stdout] [--attach] [--thread]\n+'git-format-patch' [-n | -k] [-o <dir> | --stdout] [--thread]\n+\t           [--attach[=<boundary>] | --inline[=<boundary>]]\n \t           [-s | --signoff] [--diff-options] [--start-number <n>]\n \t\t   [--in-reply-to=Message-Id] [--suffix=.<sfx>]\n \t\t   [--ignore-if-in-upstream]\n@@ -68,8 +69,15 @@ OPTIONS\n \tPrint all commits to the standard output in mbox format,\n \tinstead of creating a file for each one.\n \n---attach::\n-\tCreate attachments instead of inlining patches.\n+--attach[=<boundary>]::\n+\tCreate multipart/mixed attachment, the first part of\n+\twhich is the commit message and the patch itself in the\n+\tsecond part, with \"Content-Disposition: attachment\".\n+\n+--inline[=<boundary>]::\n+\tCreate multipart/mixed attachment, the first part of\n+\twhich is the commit message and the patch itself in the\n+\tsecond part, with \"Content-Disposition: inline\".\n \n --thread::\n \tAdd In-Reply-To and References headers to make the second and\ndiff --git a/builtin-log.c b/builtin-log.c\nindex 1c9f7d0..865832c 100644\n--- a/builtin-log.c\n+++ b/builtin-log.c\n@@ -482,10 +482,22 @@ int cmd_format_patch(int argc, const char **argv, const char *prefix)\n \t\t\tmemcpy(add_signoff, committer, endpos - committer + 1);\n \t\t\tadd_signoff[endpos - committer + 1] = 0;\n \t\t}\n-\t\telse if (!strcmp(argv[i], \"--attach\"))\n+\t\telse if (!strcmp(argv[i], \"--attach\")) {\n \t\t\trev.mime_boundary = git_version_string;\n-\t\telse if (!prefixcmp(argv[i], \"--attach=\"))\n+\t\t\trev.no_inline = 1;\n+\t\t}\n+\t\telse if (!prefixcmp(argv[i], \"--attach=\")) {\n+\t\t\trev.mime_boundary = argv[i] + 9;\n+\t\t\trev.no_inline = 1;\n+\t\t}\n+\t\telse if (!strcmp(argv[i], \"--inline\")) {\n+\t\t\trev.mime_boundary = git_version_string;\n+\t\t\trev.no_inline = 0;\n+\t\t}\n+\t\telse if (!prefixcmp(argv[i], \"--inline=\")) {\n \t\t\trev.mime_boundary = argv[i] + 9;\n+\t\t\trev.no_inline = 0;\n+\t\t}\n \t\telse if (!strcmp(argv[i], \"--ignore-if-in-upstream\"))\n \t\t\tignore_if_in_upstream = 1;\n \t\telse if (!strcmp(argv[i], \"--thread\"))\ndiff --git a/log-tree.c b/log-tree.c\nindex 6ce239d..7b3ad7d 100644\n--- a/log-tree.c\n+++ b/log-tree.c\n@@ -205,10 +205,12 @@ void show_log(struct rev_info *opt, const char *sep)\n \t\t\t\t \"Content-Type: text/x-patch;\\n\"\n \t\t\t\t \" name=\\\"%s.diff\\\"\\n\"\n \t\t\t\t \"Content-Transfer-Encoding: 8bit\\n\"\n-\t\t\t\t \"Content-Disposition: inline;\\n\"\n+\t\t\t\t \"Content-Disposition: %s;\\n\"\n \t\t\t\t \" filename=\\\"%s.diff\\\"\\n\\n\",\n \t\t\t\t mime_boundary_leader, opt->mime_boundary,\n-\t\t\t\t sha1, sha1);\n+\t\t\t\t sha1,\n+\t\t\t\t opt->no_inline ? \"attachment\" : \"inline\",\n+\t\t\t\t sha1);\n \t\t\topt->diffopt.stat_sep = buffer;\n \t\t}\n \t} else if (opt->commit_format != CMIT_FMT_USERFORMAT) {\ndiff --git a/revision.h b/revision.h\nindex 5fec184..cf33713 100644\n--- a/revision.h\n+++ b/revision.h\n@@ -74,6 +74,7 @@ struct rev_info {\n \tconst char\t*add_signoff;\n \tconst char\t*extra_headers;\n \tconst char\t*log_reencode;\n+\tint\t\tno_inline;\n \n \t/* Filter by commit log message */\n \tstruct grep_opt\t*grep_filter;\n-- \n1.5.0.2.864.ge1aa\n"},{"id":"36234","messageId":"Pine.LNX.4.63.0703041230160.22628@wbgn013.biozentrum.uni-wuerzburg.de","threadId":"7073","inReplyTo":"7vmz2t7i1x.fsf@assigned-by-dhcp.cox.net","subject":"Re: Creating attachments using git-format-patch","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2007-03-04T11:30:44Z","receivedAt":"2007-03-04T11:30:44Z","isPatch":false,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi,\n\nOn Sat, 3 Mar 2007, Junio C Hamano wrote:\n\n> Hopefully-Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de>\n\nIndeed-Signed-off-by: <ident>\n\nCiao,\nDscho\n"},{"id":"36246","messageId":"45EB2294.9040702@issaris.org","threadId":"7073","inReplyTo":"7vmz2t7i1x.fsf@assigned-by-dhcp.cox.net","subject":"Re: Creating attachments using git-format-patch","fromName":"Panagiotis Issaris","fromEmail":"takis@issaris.org","sentAt":"2007-03-04T19:48:36Z","receivedAt":"2007-03-04T19:48:36Z","isPatch":false,"sender":{"key":"takis@issaris.org","avatar":"https://gravatar.com/avatar/3075e01ed561c6d890ff95515ba9489b6e694bb751786087d044eab9bea32607?d=mp&s=160"},"body":"Hi,\n\nJunio C Hamano schreef:\n> The existing --attach option did not create a true \"attachment\"\n> but multipart/mixed with Content-Disposition: inline.  It should\n> have been with Content-Disposition: attachment.\n>\n> Introduce --inline to add multipart/mixed that is inlined, and\n> make --attach to create an attachement.\n>\n> [...]\n\nThe patch did not work for me until I modified it a bit. I've added a \nmodified full patch and an incremental one.\n\nThe patch did not work for me in the sense that the patches still \nappeared as inline text in both Mutt (1.5.13) and Thunderbird (2 beta 2).\n\nThe email show up as being threaded in Mutt, but in Thunderbird they \nstill do not show up threaded. (Others do show up threaded, such as this \nthread about git-format-patch attachments, so Thunderbird appears to \nwork alright).\n\n Documentation/git-format-patch.txt |   14 +++++++++++---\n builtin-log.c                      |   16 ++++++++++++++--\n log-tree.c                         |   10 ++++++----\n revision.h                         |    1 +\n 4 files changed, 32 insertions(+), 9 deletions(-)\n\n\n log-tree.c |    6 +++---\n 1 file changed, 3 insertions(+), 3 deletions(-)\n\nSigned-off-by: Panagiotis Issaris <takis@issaris.org>\n\n\nThanks for the quick response and help! :-)\n\nWith friendly regards,\n\nTakis\n\n\ndiff --git a/Documentation/git-format-patch.txt b/Documentation/git-format-patch.txt\nindex 59f34b9..dfdb652 100644\n--- a/Documentation/git-format-patch.txt\n+++ b/Documentation/git-format-patch.txt\n@@ -9,7 +9,8 @@ git-format-patch - Prepare patches for e-mail submission\n SYNOPSIS\n --------\n [verse]\n-'git-format-patch' [-n | -k] [-o <dir> | --stdout] [--attach] [--thread]\n+'git-format-patch' [-n | -k] [-o <dir> | --stdout] [--thread]\n+\t           [--attach[=<boundary>] | --inline[=<boundary>]]\n \t           [-s | --signoff] [--diff-options] [--start-number <n>]\n \t\t   [--in-reply-to=Message-Id] [--suffix=.<sfx>]\n \t\t   [--ignore-if-in-upstream]\n@@ -68,8 +69,15 @@ OPTIONS\n \tPrint all commits to the standard output in mbox format,\n \tinstead of creating a file for each one.\n \n---attach::\n-\tCreate attachments instead of inlining patches.\n+--attach[=<boundary>]::\n+\tCreate multipart/mixed attachment, the first part of\n+\twhich is the commit message and the patch itself in the\n+\tsecond part, with \"Content-Disposition: attachment\".\n+\n+--inline[=<boundary>]::\n+\tCreate multipart/mixed attachment, the first part of\n+\twhich is the commit message and the patch itself in the\n+\tsecond part, with \"Content-Disposition: inline\".\n \n --thread::\n \tAdd In-Reply-To and References headers to make the second and\ndiff --git a/builtin-log.c b/builtin-log.c\nindex 1c9f7d0..865832c 100644\n--- a/builtin-log.c\n+++ b/builtin-log.c\n@@ -482,10 +482,22 @@ int cmd_format_patch(int argc, const char **argv, const char *prefix)\n \t\t\tmemcpy(add_signoff, committer, endpos - committer + 1);\n \t\t\tadd_signoff[endpos - committer + 1] = 0;\n \t\t}\n-\t\telse if (!strcmp(argv[i], \"--attach\"))\n+\t\telse if (!strcmp(argv[i], \"--attach\")) {\n \t\t\trev.mime_boundary = git_version_string;\n-\t\telse if (!prefixcmp(argv[i], \"--attach=\"))\n+\t\t\trev.no_inline = 1;\n+\t\t}\n+\t\telse if (!prefixcmp(argv[i], \"--attach=\")) {\n+\t\t\trev.mime_boundary = argv[i] + 9;\n+\t\t\trev.no_inline = 1;\n+\t\t}\n+\t\telse if (!strcmp(argv[i], \"--inline\")) {\n+\t\t\trev.mime_boundary = git_version_string;\n+\t\t\trev.no_inline = 0;\n+\t\t}\n+\t\telse if (!prefixcmp(argv[i], \"--inline=\")) {\n \t\t\trev.mime_boundary = argv[i] + 9;\n+\t\t\trev.no_inline = 0;\n+\t\t}\n \t\telse if (!strcmp(argv[i], \"--ignore-if-in-upstream\"))\n \t\t\tignore_if_in_upstream = 1;\n \t\telse if (!strcmp(argv[i], \"--thread\"))\ndiff --git a/log-tree.c b/log-tree.c\nindex 6ce239d..8797aa1 100644\n--- a/log-tree.c\n+++ b/log-tree.c\n@@ -186,7 +186,7 @@ void show_log(struct rev_info *opt, const char *sep)\n \t\t\tsnprintf(subject_buffer, sizeof(subject_buffer) - 1,\n \t\t\t\t \"%s\"\n \t\t\t\t \"MIME-Version: 1.0\\n\"\n-\t\t\t\t \"Content-Type: multipart/mixed;\\n\"\n+\t\t\t\t \"Content-Type: multipart/mixed;\"\n \t\t\t\t \" boundary=\\\"%s%s\\\"\\n\"\n \t\t\t\t \"\\n\"\n \t\t\t\t \"This is a multi-part message in MIME \"\n@@ -202,13 +202,15 @@ void show_log(struct rev_info *opt, const char *sep)\n \n \t\t\tsnprintf(buffer, sizeof(buffer) - 1,\n \t\t\t\t \"--%s%s\\n\"\n-\t\t\t\t \"Content-Type: text/x-patch;\\n\"\n+\t\t\t\t \"Content-Type: text/x-patch;\"\n \t\t\t\t \" name=\\\"%s.diff\\\"\\n\"\n \t\t\t\t \"Content-Transfer-Encoding: 8bit\\n\"\n-\t\t\t\t \"Content-Disposition: inline;\\n\"\n+\t\t\t\t \"Content-Disposition: %s;\"\n \t\t\t\t \" filename=\\\"%s.diff\\\"\\n\\n\",\n \t\t\t\t mime_boundary_leader, opt->mime_boundary,\n-\t\t\t\t sha1, sha1);\n+\t\t\t\t sha1,\n+\t\t\t\t opt->no_inline ? \"attachment\" : \"inline\",\n+\t\t\t\t sha1);\n \t\t\topt->diffopt.stat_sep = buffer;\n \t\t}\n \t} else if (opt->commit_format != CMIT_FMT_USERFORMAT) {\ndiff --git a/revision.h b/revision.h\nindex 5fec184..cf33713 100644\n--- a/revision.h\n+++ b/revision.h\n@@ -74,6 +74,7 @@ struct rev_info {\n \tconst char\t*add_signoff;\n \tconst char\t*extra_headers;\n \tconst char\t*log_reencode;\n+\tint\t\tno_inline;\n \n \t/* Filter by commit log message */\n \tstruct grep_opt\t*grep_filter;\n\n\ndiff -u b/log-tree.c b/log-tree.c\n--- b/log-tree.c\n+++ b/log-tree.c\n@@ -186,7 +186,7 @@\n \t\t\tsnprintf(subject_buffer, sizeof(subject_buffer) - 1,\n \t\t\t\t \"%s\"\n \t\t\t\t \"MIME-Version: 1.0\\n\"\n-\t\t\t\t \"Content-Type: multipart/mixed;\\n\"\n+\t\t\t\t \"Content-Type: multipart/mixed;\"\n \t\t\t\t \" boundary=\\\"%s%s\\\"\\n\"\n \t\t\t\t \"\\n\"\n \t\t\t\t \"This is a multi-part message in MIME \"\n@@ -202,10 +202,10 @@\n \n \t\t\tsnprintf(buffer, sizeof(buffer) - 1,\n \t\t\t\t \"--%s%s\\n\"\n-\t\t\t\t \"Content-Type: text/x-patch;\\n\"\n+\t\t\t\t \"Content-Type: text/x-patch;\"\n \t\t\t\t \" name=\\\"%s.diff\\\"\\n\"\n \t\t\t\t \"Content-Transfer-Encoding: 8bit\\n\"\n-\t\t\t\t \"Content-Disposition: %s;\\n\"\n+\t\t\t\t \"Content-Disposition: %s;\"\n \t\t\t\t \" filename=\\\"%s.diff\\\"\\n\\n\",\n \t\t\t\t mime_boundary_leader, opt->mime_boundary,\n \t\t\t\t sha1,\n"},{"id":"36247","messageId":"20070304195641.GA16274@issaris.org","threadId":"7073","inReplyTo":"45EB2294.9040702@issaris.org","subject":"Re: Creating attachments using git-format-patch","fromName":"Panagiotis Issaris","fromEmail":"takis.issaris@uhasselt.be","sentAt":"2007-03-04T19:56:41Z","receivedAt":"2007-03-04T19:56:41Z","isPatch":false,"sender":{"key":"takis.issaris@uhasselt.be","avatar":null},"body":"Hi,\n\nOn Sun, Mar 04, 2007 at 08:48:36PM +0100, Panagiotis Issaris wrote:\n> Junio C Hamano schreef:\n> >The existing --attach option did not create a true \"attachment\"\n> >but multipart/mixed with Content-Disposition: inline.  It should\n> >have been with Content-Disposition: attachment.\n> >\n> >Introduce --inline to add multipart/mixed that is inlined, and\n> >make --attach to create an attachement.\n> >\n> >[...]\n> Thanks for the quick response and help! :-)\n\nSorry for the attachment in the previous email...\n\nWith friendly regards,\n\nTakis\n\n\ndiff --git a/Documentation/git-format-patch.txt b/Documentation/git-format-patch.txt\nindex 59f34b9..dfdb652 100644\n--- a/Documentation/git-format-patch.txt\n+++ b/Documentation/git-format-patch.txt\n@@ -9,7 +9,8 @@ git-format-patch - Prepare patches for e-mail submission\n SYNOPSIS\n --------\n [verse]\n-'git-format-patch' [-n | -k] [-o <dir> | --stdout] [--attach] [--thread]\n+'git-format-patch' [-n | -k] [-o <dir> | --stdout] [--thread]\n+\t           [--attach[=<boundary>] | --inline[=<boundary>]]\n \t           [-s | --signoff] [--diff-options] [--start-number <n>]\n \t\t   [--in-reply-to=Message-Id] [--suffix=.<sfx>]\n \t\t   [--ignore-if-in-upstream]\n@@ -68,8 +69,15 @@ OPTIONS\n \tPrint all commits to the standard output in mbox format,\n \tinstead of creating a file for each one.\n \n---attach::\n-\tCreate attachments instead of inlining patches.\n+--attach[=<boundary>]::\n+\tCreate multipart/mixed attachment, the first part of\n+\twhich is the commit message and the patch itself in the\n+\tsecond part, with \"Content-Disposition: attachment\".\n+\n+--inline[=<boundary>]::\n+\tCreate multipart/mixed attachment, the first part of\n+\twhich is the commit message and the patch itself in the\n+\tsecond part, with \"Content-Disposition: inline\".\n \n --thread::\n \tAdd In-Reply-To and References headers to make the second and\ndiff --git a/builtin-log.c b/builtin-log.c\nindex 1c9f7d0..865832c 100644\n--- a/builtin-log.c\n+++ b/builtin-log.c\n@@ -482,10 +482,22 @@ int cmd_format_patch(int argc, const char **argv, const char *prefix)\n \t\t\tmemcpy(add_signoff, committer, endpos - committer + 1);\n \t\t\tadd_signoff[endpos - committer + 1] = 0;\n \t\t}\n-\t\telse if (!strcmp(argv[i], \"--attach\"))\n+\t\telse if (!strcmp(argv[i], \"--attach\")) {\n \t\t\trev.mime_boundary = git_version_string;\n-\t\telse if (!prefixcmp(argv[i], \"--attach=\"))\n+\t\t\trev.no_inline = 1;\n+\t\t}\n+\t\telse if (!prefixcmp(argv[i], \"--attach=\")) {\n+\t\t\trev.mime_boundary = argv[i] + 9;\n+\t\t\trev.no_inline = 1;\n+\t\t}\n+\t\telse if (!strcmp(argv[i], \"--inline\")) {\n+\t\t\trev.mime_boundary = git_version_string;\n+\t\t\trev.no_inline = 0;\n+\t\t}\n+\t\telse if (!prefixcmp(argv[i], \"--inline=\")) {\n \t\t\trev.mime_boundary = argv[i] + 9;\n+\t\t\trev.no_inline = 0;\n+\t\t}\n \t\telse if (!strcmp(argv[i], \"--ignore-if-in-upstream\"))\n \t\t\tignore_if_in_upstream = 1;\n \t\telse if (!strcmp(argv[i], \"--thread\"))\ndiff --git a/log-tree.c b/log-tree.c\nindex 6ce239d..8797aa1 100644\n--- a/log-tree.c\n+++ b/log-tree.c\n@@ -186,7 +186,7 @@ void show_log(struct rev_info *opt, const char *sep)\n \t\t\tsnprintf(subject_buffer, sizeof(subject_buffer) - 1,\n \t\t\t\t \"%s\"\n \t\t\t\t \"MIME-Version: 1.0\\n\"\n-\t\t\t\t \"Content-Type: multipart/mixed;\\n\"\n+\t\t\t\t \"Content-Type: multipart/mixed;\"\n \t\t\t\t \" boundary=\\\"%s%s\\\"\\n\"\n \t\t\t\t \"\\n\"\n \t\t\t\t \"This is a multi-part message in MIME \"\n@@ -202,13 +202,15 @@ void show_log(struct rev_info *opt, const char *sep)\n \n \t\t\tsnprintf(buffer, sizeof(buffer) - 1,\n \t\t\t\t \"--%s%s\\n\"\n-\t\t\t\t \"Content-Type: text/x-patch;\\n\"\n+\t\t\t\t \"Content-Type: text/x-patch;\"\n \t\t\t\t \" name=\\\"%s.diff\\\"\\n\"\n \t\t\t\t \"Content-Transfer-Encoding: 8bit\\n\"\n-\t\t\t\t \"Content-Disposition: inline;\\n\"\n+\t\t\t\t \"Content-Disposition: %s;\"\n \t\t\t\t \" filename=\\\"%s.diff\\\"\\n\\n\",\n \t\t\t\t mime_boundary_leader, opt->mime_boundary,\n-\t\t\t\t sha1, sha1);\n+\t\t\t\t sha1,\n+\t\t\t\t opt->no_inline ? \"attachment\" : \"inline\",\n+\t\t\t\t sha1);\n \t\t\topt->diffopt.stat_sep = buffer;\n \t\t}\n \t} else if (opt->commit_format != CMIT_FMT_USERFORMAT) {\ndiff --git a/revision.h b/revision.h\nindex 5fec184..cf33713 100644\n--- a/revision.h\n+++ b/revision.h\n@@ -74,6 +74,7 @@ struct rev_info {\n \tconst char\t*add_signoff;\n \tconst char\t*extra_headers;\n \tconst char\t*log_reencode;\n+\tint\t\tno_inline;\n \n \t/* Filter by commit log message */\n \tstruct grep_opt\t*grep_filter;\n"},{"id":"36249","messageId":"7vodn84ru2.fsf@assigned-by-dhcp.cox.net","threadId":"7073","inReplyTo":"45EB2294.9040702@issaris.org","subject":"Re: Creating attachments using git-format-patch","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2007-03-04T21:33:09Z","receivedAt":"2007-03-04T21:33:09Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Panagiotis Issaris <takis@issaris.org> writes:\n\n> The patch did not work for me in the sense that the patches still \n> appeared as inline text in both Mutt (1.5.13) and Thunderbird (2 beta 2).\n>\n> The email show up as being threaded in Mutt, but in Thunderbird they \n> still do not show up threaded.\n> thread about git-format-patch attachments, so Thunderbird appears to \n> work alright).\n\nIf the patch below is needed, then I doubt you can honestly say\nit appears to work...\n\n> diff -u b/log-tree.c b/log-tree.c\n> --- b/log-tree.c\n> +++ b/log-tree.c\n> @@ -186,7 +186,7 @@\n>  \t\t\tsnprintf(subject_buffer, sizeof(subject_buffer) - 1,\n>  \t\t\t\t \"%s\"\n>  \t\t\t\t \"MIME-Version: 1.0\\n\"\n> -\t\t\t\t \"Content-Type: multipart/mixed;\\n\"\n> +\t\t\t\t \"Content-Type: multipart/mixed;\"\n>  \t\t\t\t \" boundary=\\\"%s%s\\\"\\n\"\n>  \t\t\t\t \"\\n\"\n>  \t\t\t\t \"This is a multi-part message in MIME \"\n> @@ -202,10 +202,10 @@\n>  \n>  \t\t\tsnprintf(buffer, sizeof(buffer) - 1,\n>  \t\t\t\t \"--%s%s\\n\"\n> -\t\t\t\t \"Content-Type: text/x-patch;\\n\"\n> +\t\t\t\t \"Content-Type: text/x-patch;\"\n>  \t\t\t\t \" name=\\\"%s.diff\\\"\\n\"\n>  \t\t\t\t \"Content-Transfer-Encoding: 8bit\\n\"\n> -\t\t\t\t \"Content-Disposition: %s;\\n\"\n> +\t\t\t\t \"Content-Disposition: %s;\"\n>  \t\t\t\t \" filename=\\\"%s.diff\\\"\\n\\n\",\n>  \t\t\t\t mime_boundary_leader, opt->mime_boundary,\n>  \t\t\t\t sha1,\n\nBut if it helps some implementations of MIME decoder without\nharming others, then I'd say why not.  I just wanted to make\nsure it does not throw regression at others (for example by\nmaking the physical line too long for them to grok).\n"},{"id":"36251","messageId":"20070304214809.GA18861@issaris.org","threadId":"7073","inReplyTo":"7vodn84ru2.fsf@assigned-by-dhcp.cox.net","subject":"Re: Creating attachments using git-format-patch","fromName":"Panagiotis Issaris","fromEmail":"takis.issaris@uhasselt.be","sentAt":"2007-03-04T21:48:09Z","receivedAt":"2007-03-04T21:48:09Z","isPatch":false,"sender":{"key":"takis.issaris@uhasselt.be","avatar":null},"body":"Hi,\n\nOn Sun, Mar 04, 2007 at 01:33:09PM -0800, Junio C Hamano wrote:\n> Panagiotis Issaris <takis@issaris.org> writes:\n> \n> > The patch did not work for me in the sense that the patches still \n> > appeared as inline text in both Mutt (1.5.13) and Thunderbird (2 beta 2).\n> >\n> > The email show up as being threaded in Mutt, but in Thunderbird they \n> > still do not show up threaded.\n> > thread about git-format-patch attachments, so Thunderbird appears to \n> > work alright).\n> \n> If the patch below is needed, then I doubt you can honestly say\n> it appears to work...\nWell, here on Ubuntu using Mutt and Thunderbird the change below indeed makes\nthe patches appear as attachments instead of inline text.\n\nThe e-mails not showing up as one thread is probably some other issue, or some\nmisuse of me of git-format-patch and git-send-email.\n\nI'm trying to get one e-mail sent with a header of [PATCH 00/16] with the other\npatches as attachments to that one summary e-mail. Initially they did not show\nup as being threaded in Thunderbird, but they did show up being threaded in\nMutt. Now, with some experimentation, I managed to get them to show up in a\nthread in Thunderbird too, but unfortunately, now I am seeing the [PATCH 00/16]\ne-mail followed by one reply [PATCH 01/16] and all others are replies to [PATCH\n01/16] instead of [PATCH 00/16]. Or by further experimentation, I got the [PATCH\n00/16] e-mail sent with 14 replies correctly threaded, but two of them for some\nreader not ending up in the same thread...\n\ngit-format-patch --thread --attach -n origin..or2\n\ngit-send-email --no-chain-reply-to --to takis.issaris@uhasselt.be --from \\\ntakis@issaris.org --subject \"[PATCH 00/16] Various Doxygen related patches\" \\\n--suppress-from --compose 00*patch\n\nI've tried removing the --no-chain-reply and removing the --thread option of\nformat-patch, but I never manage to get the mails sent in the way I want them\nto.\n\nAnyway, I think my not-showing-up-as-a-thread issue is mainly because of me not\nunderstanding how to use it correctly :) and being unrelated to the\npatches-showing-up-inline-instead-of-as-attachments issue, which is really fixed\nhere with the patch shown below.\n\nIn fact, I noticed that using --inline or --attach does not seem to make a\ndifference for Mutt or Thunderbird, in both cases the emails appear to have\nattachments now :-/\n\nThe way I came to the patch below is by manually editing the e-mails generated\nby git-format-patch and sending them after each modification with git-send-email\nuntil I figured out what change made the patches appear as attachments in both\nemail clients.\n\n> > diff -u b/log-tree.c b/log-tree.c\n> > --- b/log-tree.c\n> > +++ b/log-tree.c\n> > @@ -186,7 +186,7 @@\n> >  \t\t\tsnprintf(subject_buffer, sizeof(subject_buffer) - 1,\n> >  \t\t\t\t \"%s\"\n> >  \t\t\t\t \"MIME-Version: 1.0\\n\"\n> > -\t\t\t\t \"Content-Type: multipart/mixed;\\n\"\n> > +\t\t\t\t \"Content-Type: multipart/mixed;\"\n> >  \t\t\t\t \" boundary=\\\"%s%s\\\"\\n\"\n> >  \t\t\t\t \"\\n\"\n> >  \t\t\t\t \"This is a multi-part message in MIME \"\n> > @@ -202,10 +202,10 @@\n> >  \n> >  \t\t\tsnprintf(buffer, sizeof(buffer) - 1,\n> >  \t\t\t\t \"--%s%s\\n\"\n> > -\t\t\t\t \"Content-Type: text/x-patch;\\n\"\n> > +\t\t\t\t \"Content-Type: text/x-patch;\"\n> >  \t\t\t\t \" name=\\\"%s.diff\\\"\\n\"\n> >  \t\t\t\t \"Content-Transfer-Encoding: 8bit\\n\"\n> > -\t\t\t\t \"Content-Disposition: %s;\\n\"\n> > +\t\t\t\t \"Content-Disposition: %s;\"\n> >  \t\t\t\t \" filename=\\\"%s.diff\\\"\\n\\n\",\n> >  \t\t\t\t mime_boundary_leader, opt->mime_boundary,\n> >  \t\t\t\t sha1,\n> \n> But if it helps some implementations of MIME decoder without\n> harming others, then I'd say why not.  I just wanted to make\n> sure it does not throw regression at others (for example by\n> making the physical line too long for them to grok).\nOf course, I fully understand your cautiousness.\n\nWith friendly regards,\nTakis \n"},{"id":"36271","messageId":"7vzm6s360f.fsf@assigned-by-dhcp.cox.net","threadId":"7073","inReplyTo":"45EB2294.9040702@issaris.org","subject":"Re: Creating attachments using git-format-patch","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2007-03-05T00:09:52Z","receivedAt":"2007-03-05T00:09:52Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Panagiotis Issaris <takis@issaris.org> writes:\n\n> The patch did not work for me in the sense that the patches still\n> appeared as inline text in both Mutt (1.5.13) and Thunderbird (2 beta\n> 2).\n\nOk, I'll park this in 'next'.\n\n-- >8 --\nFrom: Junio C Hamano <junkio@cox.net>\nDate: Sun, 4 Mar 2007 16:08:04 -0800\nSubject: [PATCH] format-patch --attach: not folding some long headers.\n\nPanagiotis Issaris reports that some MUAs seem not to like\nfolded \"content-type\" and \"content-disposition\" headers, so this\nmakes format-patch --attach output to avoid them.\n\nSigned-off-by: Junio C Hamano <junkio@cox.net>\n---\n log-tree.c                                         |    6 ++--\n t/t4013-diff-various.sh                            |    2 +-\n ....format-patch_--attach_--stdout_initial..master |   27 ++++++-------------\n ...format-patch_--attach_--stdout_initial..master^ |   18 ++++---------\n ...ff.format-patch_--attach_--stdout_initial..side |    9 ++----\n ....format-patch_--inline_--stdout_initial..master |   27 ++++++-------------\n ...format-patch_--inline_--stdout_initial..master^ |   18 ++++---------\n ...ff.format-patch_--inline_--stdout_initial..side |    9 ++----\n 8 files changed, 40 insertions(+), 76 deletions(-)\n\ndiff --git a/log-tree.c b/log-tree.c\nindex 7b3ad7d..8797aa1 100644\n--- a/log-tree.c\n+++ b/log-tree.c\n@@ -186,7 +186,7 @@ void show_log(struct rev_info *opt, const char *sep)\n \t\t\tsnprintf(subject_buffer, sizeof(subject_buffer) - 1,\n \t\t\t\t \"%s\"\n \t\t\t\t \"MIME-Version: 1.0\\n\"\n-\t\t\t\t \"Content-Type: multipart/mixed;\\n\"\n+\t\t\t\t \"Content-Type: multipart/mixed;\"\n \t\t\t\t \" boundary=\\\"%s%s\\\"\\n\"\n \t\t\t\t \"\\n\"\n \t\t\t\t \"This is a multi-part message in MIME \"\n@@ -202,10 +202,10 @@ void show_log(struct rev_info *opt, const char *sep)\n \n \t\t\tsnprintf(buffer, sizeof(buffer) - 1,\n \t\t\t\t \"--%s%s\\n\"\n-\t\t\t\t \"Content-Type: text/x-patch;\\n\"\n+\t\t\t\t \"Content-Type: text/x-patch;\"\n \t\t\t\t \" name=\\\"%s.diff\\\"\\n\"\n \t\t\t\t \"Content-Transfer-Encoding: 8bit\\n\"\n-\t\t\t\t \"Content-Disposition: %s;\\n\"\n+\t\t\t\t \"Content-Disposition: %s;\"\n \t\t\t\t \" filename=\\\"%s.diff\\\"\\n\\n\",\n \t\t\t\t mime_boundary_leader, opt->mime_boundary,\n \t\t\t\t sha1,\ndiff --git a/t/t4013-diff-various.sh b/t/t4013-diff-various.sh\nindex 28787a1..8345ef5 100755\n--- a/t/t4013-diff-various.sh\n+++ b/t/t4013-diff-various.sh\n@@ -106,7 +106,7 @@ do\n \t\t\techo \"\\$ git $cmd\"\n \t\t\tgit $cmd |\n \t\t\tsed -e \"s/^\\\\(-*\\\\)$V\\\\(-*\\\\)\\$/\\\\1g-i-t--v-e-r-s-i-o-n\\2/\" \\\n-\t\t\t    -e \"s/^\\\\( *boundary=\\\"-*\\\\)$V\\\\(-*\\\\)\\\"\\$/\\\\1g-i-t--v-e-r-s-i-o-n\\2\\\"/\"\n+\t\t\t    -e \"s/^\\\\(.*mixed; boundary=\\\"-*\\\\)$V\\\\(-*\\\\)\\\"\\$/\\\\1g-i-t--v-e-r-s-i-o-n\\2\\\"/\"\n \t\t\techo \"\\$\"\n \t\t} >\"$actual\" &&\n \t\tif test -f \"$expect\"\ndiff --git a/t/t4013/diff.format-patch_--attach_--stdout_initial..master b/t/t4013/diff.format-patch_--attach_--stdout_initial..master\nindex 33ce92d..cf6891f 100644\n--- a/t/t4013/diff.format-patch_--attach_--stdout_initial..master\n+++ b/t/t4013/diff.format-patch_--attach_--stdout_initial..master\n@@ -4,8 +4,7 @@ From: A U Thor <author@example.com>\n Date: Mon, 26 Jun 2006 00:01:00 +0000\n Subject: [PATCH] Second\n MIME-Version: 1.0\n-Content-Type: multipart/mixed;\n- boundary=\"------------g-i-t--v-e-r-s-i-o-n\"\n+Content-Type: multipart/mixed; boundary=\"------------g-i-t--v-e-r-s-i-o-n\"\n \n This is a multi-part message in MIME format.\n --------------g-i-t--v-e-r-s-i-o-n\n@@ -21,11 +20,9 @@ This is the second commit.\n  3 files changed, 5 insertions(+), 3 deletions(-)\n  delete mode 100644 file2\n --------------g-i-t--v-e-r-s-i-o-n\n-Content-Type: text/x-patch;\n- name=\"1bde4ae5f36c8d9abe3a0fce0c6aab3c4a12fe44.diff\"\n+Content-Type: text/x-patch; name=\"1bde4ae5f36c8d9abe3a0fce0c6aab3c4a12fe44.diff\"\n Content-Transfer-Encoding: 8bit\n-Content-Disposition: attachment;\n- filename=\"1bde4ae5f36c8d9abe3a0fce0c6aab3c4a12fe44.diff\"\n+Content-Disposition: attachment; filename=\"1bde4ae5f36c8d9abe3a0fce0c6aab3c4a12fe44.diff\"\n \n diff --git a/dir/sub b/dir/sub\n index 35d242b..8422d40 100644\n@@ -66,8 +63,7 @@ From: A U Thor <author@example.com>\n Date: Mon, 26 Jun 2006 00:02:00 +0000\n Subject: [PATCH] Third\n MIME-Version: 1.0\n-Content-Type: multipart/mixed;\n- boundary=\"------------g-i-t--v-e-r-s-i-o-n\"\n+Content-Type: multipart/mixed; boundary=\"------------g-i-t--v-e-r-s-i-o-n\"\n \n This is a multi-part message in MIME format.\n --------------g-i-t--v-e-r-s-i-o-n\n@@ -80,11 +76,9 @@ Content-Transfer-Encoding: 8bit\n  2 files changed, 5 insertions(+), 0 deletions(-)\n  create mode 100644 file1\n --------------g-i-t--v-e-r-s-i-o-n\n-Content-Type: text/x-patch;\n- name=\"9a6d4949b6b76956d9d5e26f2791ec2ceff5fdc0.diff\"\n+Content-Type: text/x-patch; name=\"9a6d4949b6b76956d9d5e26f2791ec2ceff5fdc0.diff\"\n Content-Transfer-Encoding: 8bit\n-Content-Disposition: attachment;\n- filename=\"9a6d4949b6b76956d9d5e26f2791ec2ceff5fdc0.diff\"\n+Content-Disposition: attachment; filename=\"9a6d4949b6b76956d9d5e26f2791ec2ceff5fdc0.diff\"\n \n diff --git a/dir/sub b/dir/sub\n index 8422d40..cead32e 100644\n@@ -115,8 +109,7 @@ From: A U Thor <author@example.com>\n Date: Mon, 26 Jun 2006 00:03:00 +0000\n Subject: [PATCH] Side\n MIME-Version: 1.0\n-Content-Type: multipart/mixed;\n- boundary=\"------------g-i-t--v-e-r-s-i-o-n\"\n+Content-Type: multipart/mixed; boundary=\"------------g-i-t--v-e-r-s-i-o-n\"\n \n This is a multi-part message in MIME format.\n --------------g-i-t--v-e-r-s-i-o-n\n@@ -130,11 +123,9 @@ Content-Transfer-Encoding: 8bit\n  3 files changed, 9 insertions(+), 0 deletions(-)\n  create mode 100644 file3\n --------------g-i-t--v-e-r-s-i-o-n\n-Content-Type: text/x-patch;\n- name=\"c7a2ab9e8eac7b117442a607d5a9b3950ae34d5a.diff\"\n+Content-Type: text/x-patch; name=\"c7a2ab9e8eac7b117442a607d5a9b3950ae34d5a.diff\"\n Content-Transfer-Encoding: 8bit\n-Content-Disposition: attachment;\n- filename=\"c7a2ab9e8eac7b117442a607d5a9b3950ae34d5a.diff\"\n+Content-Disposition: attachment; filename=\"c7a2ab9e8eac7b117442a607d5a9b3950ae34d5a.diff\"\n \n diff --git a/dir/sub b/dir/sub\n index 35d242b..7289e35 100644\ndiff --git a/t/t4013/diff.format-patch_--attach_--stdout_initial..master^ b/t/t4013/diff.format-patch_--attach_--stdout_initial..master^\nindex d97625a..fe02587 100644\n--- a/t/t4013/diff.format-patch_--attach_--stdout_initial..master^\n+++ b/t/t4013/diff.format-patch_--attach_--stdout_initial..master^\n@@ -4,8 +4,7 @@ From: A U Thor <author@example.com>\n Date: Mon, 26 Jun 2006 00:01:00 +0000\n Subject: [PATCH] Second\n MIME-Version: 1.0\n-Content-Type: multipart/mixed;\n- boundary=\"------------g-i-t--v-e-r-s-i-o-n\"\n+Content-Type: multipart/mixed; boundary=\"------------g-i-t--v-e-r-s-i-o-n\"\n \n This is a multi-part message in MIME format.\n --------------g-i-t--v-e-r-s-i-o-n\n@@ -21,11 +20,9 @@ This is the second commit.\n  3 files changed, 5 insertions(+), 3 deletions(-)\n  delete mode 100644 file2\n --------------g-i-t--v-e-r-s-i-o-n\n-Content-Type: text/x-patch;\n- name=\"1bde4ae5f36c8d9abe3a0fce0c6aab3c4a12fe44.diff\"\n+Content-Type: text/x-patch; name=\"1bde4ae5f36c8d9abe3a0fce0c6aab3c4a12fe44.diff\"\n Content-Transfer-Encoding: 8bit\n-Content-Disposition: attachment;\n- filename=\"1bde4ae5f36c8d9abe3a0fce0c6aab3c4a12fe44.diff\"\n+Content-Disposition: attachment; filename=\"1bde4ae5f36c8d9abe3a0fce0c6aab3c4a12fe44.diff\"\n \n diff --git a/dir/sub b/dir/sub\n index 35d242b..8422d40 100644\n@@ -66,8 +63,7 @@ From: A U Thor <author@example.com>\n Date: Mon, 26 Jun 2006 00:02:00 +0000\n Subject: [PATCH] Third\n MIME-Version: 1.0\n-Content-Type: multipart/mixed;\n- boundary=\"------------g-i-t--v-e-r-s-i-o-n\"\n+Content-Type: multipart/mixed; boundary=\"------------g-i-t--v-e-r-s-i-o-n\"\n \n This is a multi-part message in MIME format.\n --------------g-i-t--v-e-r-s-i-o-n\n@@ -80,11 +76,9 @@ Content-Transfer-Encoding: 8bit\n  2 files changed, 5 insertions(+), 0 deletions(-)\n  create mode 100644 file1\n --------------g-i-t--v-e-r-s-i-o-n\n-Content-Type: text/x-patch;\n- name=\"9a6d4949b6b76956d9d5e26f2791ec2ceff5fdc0.diff\"\n+Content-Type: text/x-patch; name=\"9a6d4949b6b76956d9d5e26f2791ec2ceff5fdc0.diff\"\n Content-Transfer-Encoding: 8bit\n-Content-Disposition: attachment;\n- filename=\"9a6d4949b6b76956d9d5e26f2791ec2ceff5fdc0.diff\"\n+Content-Disposition: attachment; filename=\"9a6d4949b6b76956d9d5e26f2791ec2ceff5fdc0.diff\"\n \n diff --git a/dir/sub b/dir/sub\n index 8422d40..cead32e 100644\ndiff --git a/t/t4013/diff.format-patch_--attach_--stdout_initial..side b/t/t4013/diff.format-patch_--attach_--stdout_initial..side\nindex 0b6853d..9ff828e 100644\n--- a/t/t4013/diff.format-patch_--attach_--stdout_initial..side\n+++ b/t/t4013/diff.format-patch_--attach_--stdout_initial..side\n@@ -4,8 +4,7 @@ From: A U Thor <author@example.com>\n Date: Mon, 26 Jun 2006 00:03:00 +0000\n Subject: [PATCH] Side\n MIME-Version: 1.0\n-Content-Type: multipart/mixed;\n- boundary=\"------------g-i-t--v-e-r-s-i-o-n\"\n+Content-Type: multipart/mixed; boundary=\"------------g-i-t--v-e-r-s-i-o-n\"\n \n This is a multi-part message in MIME format.\n --------------g-i-t--v-e-r-s-i-o-n\n@@ -19,11 +18,9 @@ Content-Transfer-Encoding: 8bit\n  3 files changed, 9 insertions(+), 0 deletions(-)\n  create mode 100644 file3\n --------------g-i-t--v-e-r-s-i-o-n\n-Content-Type: text/x-patch;\n- name=\"c7a2ab9e8eac7b117442a607d5a9b3950ae34d5a.diff\"\n+Content-Type: text/x-patch; name=\"c7a2ab9e8eac7b117442a607d5a9b3950ae34d5a.diff\"\n Content-Transfer-Encoding: 8bit\n-Content-Disposition: attachment;\n- filename=\"c7a2ab9e8eac7b117442a607d5a9b3950ae34d5a.diff\"\n+Content-Disposition: attachment; filename=\"c7a2ab9e8eac7b117442a607d5a9b3950ae34d5a.diff\"\n \n diff --git a/dir/sub b/dir/sub\n index 35d242b..7289e35 100644\ndiff --git a/t/t4013/diff.format-patch_--inline_--stdout_initial..master b/t/t4013/diff.format-patch_--inline_--stdout_initial..master\nindex 68c9884..aa110c0 100644\n--- a/t/t4013/diff.format-patch_--inline_--stdout_initial..master\n+++ b/t/t4013/diff.format-patch_--inline_--stdout_initial..master\n@@ -4,8 +4,7 @@ From: A U Thor <author@example.com>\n Date: Mon, 26 Jun 2006 00:01:00 +0000\n Subject: [PATCH] Second\n MIME-Version: 1.0\n-Content-Type: multipart/mixed;\n- boundary=\"------------g-i-t--v-e-r-s-i-o-n\"\n+Content-Type: multipart/mixed; boundary=\"------------g-i-t--v-e-r-s-i-o-n\"\n \n This is a multi-part message in MIME format.\n --------------g-i-t--v-e-r-s-i-o-n\n@@ -21,11 +20,9 @@ This is the second commit.\n  3 files changed, 5 insertions(+), 3 deletions(-)\n  delete mode 100644 file2\n --------------g-i-t--v-e-r-s-i-o-n\n-Content-Type: text/x-patch;\n- name=\"1bde4ae5f36c8d9abe3a0fce0c6aab3c4a12fe44.diff\"\n+Content-Type: text/x-patch; name=\"1bde4ae5f36c8d9abe3a0fce0c6aab3c4a12fe44.diff\"\n Content-Transfer-Encoding: 8bit\n-Content-Disposition: inline;\n- filename=\"1bde4ae5f36c8d9abe3a0fce0c6aab3c4a12fe44.diff\"\n+Content-Disposition: inline; filename=\"1bde4ae5f36c8d9abe3a0fce0c6aab3c4a12fe44.diff\"\n \n diff --git a/dir/sub b/dir/sub\n index 35d242b..8422d40 100644\n@@ -66,8 +63,7 @@ From: A U Thor <author@example.com>\n Date: Mon, 26 Jun 2006 00:02:00 +0000\n Subject: [PATCH] Third\n MIME-Version: 1.0\n-Content-Type: multipart/mixed;\n- boundary=\"------------g-i-t--v-e-r-s-i-o-n\"\n+Content-Type: multipart/mixed; boundary=\"------------g-i-t--v-e-r-s-i-o-n\"\n \n This is a multi-part message in MIME format.\n --------------g-i-t--v-e-r-s-i-o-n\n@@ -80,11 +76,9 @@ Content-Transfer-Encoding: 8bit\n  2 files changed, 5 insertions(+), 0 deletions(-)\n  create mode 100644 file1\n --------------g-i-t--v-e-r-s-i-o-n\n-Content-Type: text/x-patch;\n- name=\"9a6d4949b6b76956d9d5e26f2791ec2ceff5fdc0.diff\"\n+Content-Type: text/x-patch; name=\"9a6d4949b6b76956d9d5e26f2791ec2ceff5fdc0.diff\"\n Content-Transfer-Encoding: 8bit\n-Content-Disposition: inline;\n- filename=\"9a6d4949b6b76956d9d5e26f2791ec2ceff5fdc0.diff\"\n+Content-Disposition: inline; filename=\"9a6d4949b6b76956d9d5e26f2791ec2ceff5fdc0.diff\"\n \n diff --git a/dir/sub b/dir/sub\n index 8422d40..cead32e 100644\n@@ -115,8 +109,7 @@ From: A U Thor <author@example.com>\n Date: Mon, 26 Jun 2006 00:03:00 +0000\n Subject: [PATCH] Side\n MIME-Version: 1.0\n-Content-Type: multipart/mixed;\n- boundary=\"------------g-i-t--v-e-r-s-i-o-n\"\n+Content-Type: multipart/mixed; boundary=\"------------g-i-t--v-e-r-s-i-o-n\"\n \n This is a multi-part message in MIME format.\n --------------g-i-t--v-e-r-s-i-o-n\n@@ -130,11 +123,9 @@ Content-Transfer-Encoding: 8bit\n  3 files changed, 9 insertions(+), 0 deletions(-)\n  create mode 100644 file3\n --------------g-i-t--v-e-r-s-i-o-n\n-Content-Type: text/x-patch;\n- name=\"c7a2ab9e8eac7b117442a607d5a9b3950ae34d5a.diff\"\n+Content-Type: text/x-patch; name=\"c7a2ab9e8eac7b117442a607d5a9b3950ae34d5a.diff\"\n Content-Transfer-Encoding: 8bit\n-Content-Disposition: inline;\n- filename=\"c7a2ab9e8eac7b117442a607d5a9b3950ae34d5a.diff\"\n+Content-Disposition: inline; filename=\"c7a2ab9e8eac7b117442a607d5a9b3950ae34d5a.diff\"\n \n diff --git a/dir/sub b/dir/sub\n index 35d242b..7289e35 100644\ndiff --git a/t/t4013/diff.format-patch_--inline_--stdout_initial..master^ b/t/t4013/diff.format-patch_--inline_--stdout_initial..master^\nindex 6008e77..95e9ea4 100644\n--- a/t/t4013/diff.format-patch_--inline_--stdout_initial..master^\n+++ b/t/t4013/diff.format-patch_--inline_--stdout_initial..master^\n@@ -4,8 +4,7 @@ From: A U Thor <author@example.com>\n Date: Mon, 26 Jun 2006 00:01:00 +0000\n Subject: [PATCH] Second\n MIME-Version: 1.0\n-Content-Type: multipart/mixed;\n- boundary=\"------------g-i-t--v-e-r-s-i-o-n\"\n+Content-Type: multipart/mixed; boundary=\"------------g-i-t--v-e-r-s-i-o-n\"\n \n This is a multi-part message in MIME format.\n --------------g-i-t--v-e-r-s-i-o-n\n@@ -21,11 +20,9 @@ This is the second commit.\n  3 files changed, 5 insertions(+), 3 deletions(-)\n  delete mode 100644 file2\n --------------g-i-t--v-e-r-s-i-o-n\n-Content-Type: text/x-patch;\n- name=\"1bde4ae5f36c8d9abe3a0fce0c6aab3c4a12fe44.diff\"\n+Content-Type: text/x-patch; name=\"1bde4ae5f36c8d9abe3a0fce0c6aab3c4a12fe44.diff\"\n Content-Transfer-Encoding: 8bit\n-Content-Disposition: inline;\n- filename=\"1bde4ae5f36c8d9abe3a0fce0c6aab3c4a12fe44.diff\"\n+Content-Disposition: inline; filename=\"1bde4ae5f36c8d9abe3a0fce0c6aab3c4a12fe44.diff\"\n \n diff --git a/dir/sub b/dir/sub\n index 35d242b..8422d40 100644\n@@ -66,8 +63,7 @@ From: A U Thor <author@example.com>\n Date: Mon, 26 Jun 2006 00:02:00 +0000\n Subject: [PATCH] Third\n MIME-Version: 1.0\n-Content-Type: multipart/mixed;\n- boundary=\"------------g-i-t--v-e-r-s-i-o-n\"\n+Content-Type: multipart/mixed; boundary=\"------------g-i-t--v-e-r-s-i-o-n\"\n \n This is a multi-part message in MIME format.\n --------------g-i-t--v-e-r-s-i-o-n\n@@ -80,11 +76,9 @@ Content-Transfer-Encoding: 8bit\n  2 files changed, 5 insertions(+), 0 deletions(-)\n  create mode 100644 file1\n --------------g-i-t--v-e-r-s-i-o-n\n-Content-Type: text/x-patch;\n- name=\"9a6d4949b6b76956d9d5e26f2791ec2ceff5fdc0.diff\"\n+Content-Type: text/x-patch; name=\"9a6d4949b6b76956d9d5e26f2791ec2ceff5fdc0.diff\"\n Content-Transfer-Encoding: 8bit\n-Content-Disposition: inline;\n- filename=\"9a6d4949b6b76956d9d5e26f2791ec2ceff5fdc0.diff\"\n+Content-Disposition: inline; filename=\"9a6d4949b6b76956d9d5e26f2791ec2ceff5fdc0.diff\"\n \n diff --git a/dir/sub b/dir/sub\n index 8422d40..cead32e 100644\ndiff --git a/t/t4013/diff.format-patch_--inline_--stdout_initial..side b/t/t4013/diff.format-patch_--inline_--stdout_initial..side\nindex c4d3da9..86ae923 100644\n--- a/t/t4013/diff.format-patch_--inline_--stdout_initial..side\n+++ b/t/t4013/diff.format-patch_--inline_--stdout_initial..side\n@@ -4,8 +4,7 @@ From: A U Thor <author@example.com>\n Date: Mon, 26 Jun 2006 00:03:00 +0000\n Subject: [PATCH] Side\n MIME-Version: 1.0\n-Content-Type: multipart/mixed;\n- boundary=\"------------g-i-t--v-e-r-s-i-o-n\"\n+Content-Type: multipart/mixed; boundary=\"------------g-i-t--v-e-r-s-i-o-n\"\n \n This is a multi-part message in MIME format.\n --------------g-i-t--v-e-r-s-i-o-n\n@@ -19,11 +18,9 @@ Content-Transfer-Encoding: 8bit\n  3 files changed, 9 insertions(+), 0 deletions(-)\n  create mode 100644 file3\n --------------g-i-t--v-e-r-s-i-o-n\n-Content-Type: text/x-patch;\n- name=\"c7a2ab9e8eac7b117442a607d5a9b3950ae34d5a.diff\"\n+Content-Type: text/x-patch; name=\"c7a2ab9e8eac7b117442a607d5a9b3950ae34d5a.diff\"\n Content-Transfer-Encoding: 8bit\n-Content-Disposition: inline;\n- filename=\"c7a2ab9e8eac7b117442a607d5a9b3950ae34d5a.diff\"\n+Content-Disposition: inline; filename=\"c7a2ab9e8eac7b117442a607d5a9b3950ae34d5a.diff\"\n \n diff --git a/dir/sub b/dir/sub\n index 35d242b..7289e35 100644\n-- \n1.5.0.2.878.g38f47\n"}]}