{"thread":{"id":"18063","subject":"[PATCH] fix git format-patch --cc=<email> format","startedAt":"2009-02-28T12:42:24Z","lastAt":"2009-03-01T02:24:50Z","messageCount":5,"participants":["Peng Tao","Jay Soffian","Junio C Hamano","Jeff King"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"106528","messageId":"1235824944-4967-1-git-send-email-bergwolf@gmail.com","threadId":"18063","inReplyTo":null,"subject":"[PATCH] fix git format-patch --cc=<email> format","fromName":"Peng Tao","fromEmail":"bergwolf@gmail.com","sentAt":"2009-02-28T12:42:24Z","receivedAt":"2009-02-28T12:42:24Z","isPatch":true,"sender":{"key":"bergwolf@gmail.com","avatar":null},"body":"If there are multiple --cc=<email> arguments, git format-patch will generate\npatches with cc lines like:\n  Cc: <email>,\n      <email>\nwhich git send-email fails to parse.\ngit send-email only accept formats like:\n  Cc: <email>\n  Cc: <email>\nSo change git format-patch to generate patches in a proper format.\n\nSigned-off-by: Peng Tao <bergwolf@gmail.com>\n---\n builtin-log.c |    6 +-----\n 1 files changed, 1 insertions(+), 5 deletions(-)\n\ndiff --git a/builtin-log.c b/builtin-log.c\nindex 60f8dd8..22bb6b6 100644\n--- a/builtin-log.c\n+++ b/builtin-log.c\n@@ -907,13 +907,9 @@ int cmd_format_patch(int argc, const char **argv, const char *prefix)\n \t}\n \n \tif (extra_cc_nr)\n-\t\tstrbuf_addstr(&buf, \"Cc: \");\n \tfor (i = 0; i < extra_cc_nr; i++) {\n-\t\tif (i)\n-\t\t\tstrbuf_addstr(&buf, \"    \");\n+\t\tstrbuf_addstr(&buf, \"Cc: \");\n \t\tstrbuf_addstr(&buf, extra_cc[i]);\n-\t\tif (i + 1 < extra_cc_nr)\n-\t\t\tstrbuf_addch(&buf, ',');\n \t\tstrbuf_addch(&buf, '\\n');\n \t}\n \n"},{"id":"106533","messageId":"76718490902280815if1c3fa7o790112b410d52224@mail.gmail.com","threadId":"18063","inReplyTo":"1235824944-4967-1-git-send-email-bergwolf@gmail.com","subject":"Re: [PATCH] fix git format-patch --cc=<email> format","fromName":"Jay Soffian","fromEmail":"jaysoffian@gmail.com","sentAt":"2009-02-28T16:15:35Z","receivedAt":"2009-02-28T16:15:35Z","isPatch":true,"sender":{"key":"jaysoffian@gmail.com","avatar":"https://avatars.githubusercontent.com/u/155970?v=4"},"body":"On Sat, Feb 28, 2009 at 7:42 AM, Peng Tao <bergwolf@gmail.com> wrote:\n> If there are multiple --cc=<email> arguments, git format-patch will generate\n> patches with cc lines like:\n>  Cc: <email>,\n>      <email>\n> which git send-email fails to parse.\n> git send-email only accept formats like:\n>  Cc: <email>\n>  Cc: <email>\n> So change git format-patch to generate patches in a proper format.\n\nThis is fixed in next, but we fixed send-email instead to handle the\nmessages that format-patch generates, as they should be valid.\n\nj.\n"},{"id":"106541","messageId":"7vy6vqfp0p.fsf@gitster.siamese.dyndns.org","threadId":"18063","inReplyTo":"76718490902280815if1c3fa7o790112b410d52224@mail.gmail.com","subject":"Re: [PATCH] fix git format-patch --cc=<email> format","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2009-02-28T17:29:58Z","receivedAt":"2009-02-28T17:29:58Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Jay Soffian <jaysoffian@gmail.com> writes:\n\n> On Sat, Feb 28, 2009 at 7:42 AM, Peng Tao <bergwolf@gmail.com> wrote:\n>> If there are multiple --cc=<email> arguments, git format-patch will generate\n>> patches with cc lines like:\n>>  Cc: <email>,\n>>      <email>\n>> which git send-email fails to parse.\n>> git send-email only accept formats like:\n>>  Cc: <email>\n>>  Cc: <email>\n>> So change git format-patch to generate patches in a proper format.\n>\n> This is fixed in next, but we fixed send-email instead to handle the\n> messages that format-patch generates, as they should be valid.\n\nPer RFC2822 3.6 (pp 19-20), \"cc\" is to appear at most once (same is true\nfor \"to\" and \"bcc\").  I think fix to format-patch is necessary regardless\nof what send-email does.\n"},{"id":"106568","messageId":"20090301010116.GA20255@coredump.intra.peff.net","threadId":"18063","inReplyTo":"7vy6vqfp0p.fsf@gitster.siamese.dyndns.org","subject":"Re: [PATCH] fix git format-patch --cc=<email> format","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2009-03-01T01:01:16Z","receivedAt":"2009-03-01T01:01:16Z","isPatch":true,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Sat, Feb 28, 2009 at 09:29:58AM -0800, Junio C Hamano wrote:\n\n> >> If there are multiple --cc=<email> arguments, git format-patch will generate\n> >> patches with cc lines like:\n> >>  Cc: <email>,\n> >>      <email>\n> >> which git send-email fails to parse.\n> >> git send-email only accept formats like:\n> >>  Cc: <email>\n> >>  Cc: <email>\n> >> So change git format-patch to generate patches in a proper format.\n> >\n> > This is fixed in next, but we fixed send-email instead to handle the\n> > messages that format-patch generates, as they should be valid.\n> \n> Per RFC2822 3.6 (pp 19-20), \"cc\" is to appear at most once (same is true\n> for \"to\" and \"bcc\").  I think fix to format-patch is necessary regardless\n> of what send-email does.\n\nThen isn't the current format-patch output (folding the cc over\nmultiple lines) correct, and the patch (outputting multiple cc headers)\nwrong?\n\n-Peff\n"},{"id":"106570","messageId":"7vk57aasjx.fsf@gitster.siamese.dyndns.org","threadId":"18063","inReplyTo":"20090301010116.GA20255@coredump.intra.peff.net","subject":"Re: [PATCH] fix git format-patch --cc=<email> format","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2009-03-01T02:24:50Z","receivedAt":"2009-03-01T02:24:50Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Jeff King <peff@peff.net> writes:\n\n> On Sat, Feb 28, 2009 at 09:29:58AM -0800, Junio C Hamano wrote:\n>\n>> >> If there are multiple --cc=<email> arguments, git format-patch will generate\n>> >> patches with cc lines like:\n>> >>  Cc: <email>,\n>> >>      <email>\n>> >> which git send-email fails to parse.\n>> >> git send-email only accept formats like:\n>> >>  Cc: <email>\n>> >>  Cc: <email>\n>> >> So change git format-patch to generate patches in a proper format.\n>> >\n>> > This is fixed in next, but we fixed send-email instead to handle the\n>> > messages that format-patch generates, as they should be valid.\n>> \n>> Per RFC2822 3.6 (pp 19-20), \"cc\" is to appear at most once (same is true\n>> for \"to\" and \"bcc\").  I think fix to format-patch is necessary regardless\n>> of what send-email does.\n>\n> Then isn't the current format-patch output (folding the cc over\n> multiple lines) correct, and the patch (outputting multiple cc headers)\n> wrong?\n\nAhh, sorry I misread what the commit message was saying and the patch was\ndoing.\n"}]}