{"thread":{"id":"16422","subject":"[PATCH] git-send-email: provide hook to send lines more than 998 symbols","startedAt":"2008-11-21T09:59:24Z","lastAt":"2008-11-21T14:08:04Z","messageCount":12,"participants":["Andy Shevchenko","Teemu Likonen","Arafangion","Andreas Ericsson","Jeff King","Michael J Gruber"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"96318","messageId":"1227261564-13268-1-git-send-email-andy.shevchenko@gmail.com","threadId":"16422","inReplyTo":null,"subject":"[PATCH] git-send-email: provide hook to send lines more than 998 symbols","fromName":"Andy Shevchenko","fromEmail":"andy.shevchenko@gmail.com","sentAt":"2008-11-21T09:59:24Z","receivedAt":"2008-11-21T09:59:24Z","isPatch":true,"sender":{"key":"andy.shevchenko@gmail.com","avatar":"https://gravatar.com/avatar/e7fccbe23f198167f8b4c119a3a8729d3cec5b3268293ffe07ee15a50c39938b?d=mp&s=160"},"body":"By default git-send-email does not accept patch which is contain lines longer\nthan 998 symbols. Sometime it's inconvenient, i.e. you have a long list in one\nvariable in shell script. So, define environment variable\nGIT_SEND_EMAIL_LONGLINE to something to avoid that restriction.\n\nSigned-off-by: Andy Shevchenko <andy.shevchenko@gmail.com>\n---\n git-send-email.perl |    2 +-\n 1 files changed, 1 insertions(+), 1 deletions(-)\n\ndiff --git a/git-send-email.perl b/git-send-email.perl\nindex 94ca5c8..29f700d 100755\n--- a/git-send-email.perl\n+++ b/git-send-email.perl\n@@ -981,7 +981,7 @@ sub validate_patch {\n \topen(my $fh, '<', $fn)\n \t\tor die \"unable to open $fn: $!\\n\";\n \twhile (my $line = <$fh>) {\n-\t\tif (length($line) > 998) {\n+\t\tif (length($line) > 998 and not $ENV{GIT_SEND_EMAIL_LONGLINE}) {\n \t\t\treturn \"$.: patch contains a line longer than 998 characters\";\n \t\t}\n \t}\n-- \n1.6.0.2.GIT\n"},{"id":"96336","messageId":"1227263693.3311.0.camel@therock.nsw.bigpond.net.au","threadId":"16422","inReplyTo":"1227261564-13268-1-git-send-email-andy.shevchenko@gmail.com","subject":"Re: [PATCH] git-send-email: provide hook to send lines more than 998 symbols","fromName":"Arafangion","fromEmail":"thestar@fussycoder.id.au","sentAt":"2008-11-21T10:34:53Z","receivedAt":"2008-11-21T10:34:53Z","isPatch":true,"sender":{"key":"thestar@fussycoder.id.au","avatar":null},"body":"On Fri, 2008-11-21 at 11:59 +0200, Andy Shevchenko wrote:\n> By default git-send-email does not accept patch which is contain lines longer\n> than 998 symbols. Sometime it's inconvenient, i.e. you have a long list in one\n> variable in shell script. So, define environment variable\n> GIT_SEND_EMAIL_LONGLINE to something to avoid that restriction.\n\nAs a curiosity, why is such a check even neccessary?\n"},{"id":"96319","messageId":"5ec8ebd50811210237kd6f9341q23bc69b6ffcc2a87@mail.gmail.com","threadId":"16422","inReplyTo":"1227263693.3311.0.camel@therock.nsw.bigpond.net.au","subject":"Re: [PATCH] git-send-email: provide hook to send lines more than 998 symbols","fromName":"Andy Shevchenko","fromEmail":"andy.shevchenko@gmail.com","sentAt":"2008-11-21T10:37:08Z","receivedAt":"2008-11-21T10:37:08Z","isPatch":true,"sender":{"key":"andy.shevchenko@gmail.com","avatar":"https://gravatar.com/avatar/e7fccbe23f198167f8b4c119a3a8729d3cec5b3268293ffe07ee15a50c39938b?d=mp&s=160"},"body":"On Fri, Nov 21, 2008 at 12:34 PM, Arafangion <thestar@fussycoder.id.au> wrote:\n>> By default git-send-email does not accept patch which is contain lines longer\n>> than 998 symbols. Sometime it's inconvenient, i.e. you have a long list in one\n>> variable in shell script. So, define environment variable\n>> GIT_SEND_EMAIL_LONGLINE to something to avoid that restriction.\n>\n> As a curiosity, why is such a check even neccessary?\nI'm not an author of that strange check (possible it's somehow related\nto b8ebe08b9a643f432866eb7150c3b20d59b755f2)\n\n-- \nWith Best Regards,\nAndy Shevchenko\n"},{"id":"96321","messageId":"87wsex4aha.fsf@iki.fi","threadId":"16422","inReplyTo":"5ec8ebd50811210237kd6f9341q23bc69b6ffcc2a87@mail.gmail.com","subject":"Re: [PATCH] git-send-email: provide hook to send lines more than 998 symbols","fromName":"Teemu Likonen","fromEmail":"tlikonen@iki.fi","sentAt":"2008-11-21T10:52:33Z","receivedAt":"2008-11-21T10:52:33Z","isPatch":true,"sender":{"key":"tlikonen@iki.fi","avatar":null},"body":"Andy Shevchenko (2008-11-21 12:37 +0200) wrote:\n\n> On Fri, Nov 21, 2008 at 12:34 PM, Arafangion <thestar@fussycoder.id.au> wrote:\n>>> By default git-send-email does not accept patch which is contain\n>>> lines longer than 998 symbols. Sometime it's inconvenient, i.e. you\n>>> have a long list in one variable in shell script. So, define\n>>> environment variable GIT_SEND_EMAIL_LONGLINE to something to avoid\n>>> that restriction.\n>>\n>> As a curiosity, why is such a check even neccessary?\n\n> I'm not an author of that strange check (possible it's somehow related\n> to b8ebe08b9a643f432866eb7150c3b20d59b755f2)\n\nThe author (so to say) of that strange check is RFC 2822 - Internet\nMessage Format.\n\n    2.1.1. Line Length Limits\n\n        There are two limits that this standard places on the number of\n        characters in a line. Each line of characters MUST be no more\n        than 998 characters, and SHOULD be no more than 78 characters,\n        excluding the CRLF.\n\n        The 998 character limit is due to limitations in many\n        implementations which send, receive, or store Internet Message\n        Format messages that simply cannot handle more than 998\n        characters on a line. [...]\n\nhttp://www.faqs.org/rfcs/rfc2822.html\n\nPerhaps longer lines will work in many cases but atleast warning should\nbe printed to user, or something.\n"},{"id":"96322","messageId":"5ec8ebd50811210255o10ebd19eu828965952353f076@mail.gmail.com","threadId":"16422","inReplyTo":"87wsex4aha.fsf@iki.fi","subject":"Re: [PATCH] git-send-email: provide hook to send lines more than 998 symbols","fromName":"Andy Shevchenko","fromEmail":"andy.shevchenko@gmail.com","sentAt":"2008-11-21T10:55:31Z","receivedAt":"2008-11-21T10:55:31Z","isPatch":true,"sender":{"key":"andy.shevchenko@gmail.com","avatar":"https://gravatar.com/avatar/e7fccbe23f198167f8b4c119a3a8729d3cec5b3268293ffe07ee15a50c39938b?d=mp&s=160"},"body":"On Fri, Nov 21, 2008 at 12:52 PM, Teemu Likonen <tlikonen@iki.fi> wrote:\n\nActually, the --no-validate is the true option for that.\n\n-- \nWith Best Regards,\nAndy Shevchenko\n"},{"id":"96323","messageId":"1227265742.3311.8.camel@therock.nsw.bigpond.net.au","threadId":"16422","inReplyTo":"5ec8ebd50811210237kd6f9341q23bc69b6ffcc2a87@mail.gmail.com","subject":"Re: [PATCH] git-send-email: provide hook to send lines more than 998 symbols","fromName":"Arafangion","fromEmail":"thestar@fussycoder.id.au","sentAt":"2008-11-21T11:09:02Z","receivedAt":"2008-11-21T11:09:02Z","isPatch":true,"sender":{"key":"thestar@fussycoder.id.au","avatar":null},"body":"On Fri, 2008-11-21 at 12:37 +0200, Andy Shevchenko wrote:\n> On Fri, Nov 21, 2008 at 12:34 PM, Arafangion <thestar@fussycoder.id.au> wrote:\n> >> By default git-send-email does not accept patch which is contain lines longer\n> >> than 998 symbols. Sometime it's inconvenient, i.e. you have a long list in one\n<snip>\n> > As a curiosity, why is such a check even neccessary?\n> I'm not an author of that strange check (possible it's somehow related\n> to b8ebe08b9a643f432866eb7150c3b20d59b755f2)\n\nI can't seem to find that changeset, however the reason why I asked is\nbecause I thought I remembered that some mail clients could crash if\nthey got lines longer than that, and we should cater for that even if\nthose clients should handle mails better than that!  Apparently it's\nspecified in the relevant RFC2822, and this particular solution has\nalready been contributed as:\nhttps://kerneltrap.org/mailarchive/git/2008/1/18/579779\n\nI would be inclined to suggest that such patches should be sent as an\nattachment instead? (Though this may become bikeshed painting on my\npart, see\nhttp://www.freebsd.org/doc/en/articles/mailing-list-faq/bikeshed.html\nfor what I mean by the term).\n\nWhile patches should be sent inline to encourage discussion of the\npatch, if the patch has such insanely long lines, the probability that\nthe bulk of your audience in having a good email client that doesn't\nmangle your patch may become rather low.\n\n(I really should get some sleep, not good to be argumentative when\npeople are contributing very useful patches, like yourself!)\n"},{"id":"96324","messageId":"49269F89.3040105@op5.se","threadId":"16422","inReplyTo":"1227265742.3311.8.camel@therock.nsw.bigpond.net.au","subject":"Re: [PATCH] git-send-email: provide hook to send lines more than 998 symbols","fromName":"Andreas Ericsson","fromEmail":"ae@op5.se","sentAt":"2008-11-21T11:46:17Z","receivedAt":"2008-11-21T11:46:17Z","isPatch":true,"sender":{"key":"ae@op5.se","avatar":"https://gravatar.com/avatar/426e89595c75a8f5252dd0c989e5fabe5bcac616e68557427ad9aef6b0ca342a?d=mp&s=160"},"body":"Arafangion wrote:\n> On Fri, 2008-11-21 at 12:37 +0200, Andy Shevchenko wrote:\n>> On Fri, Nov 21, 2008 at 12:34 PM, Arafangion <thestar@fussycoder.id.au> wrote:\n>>>> By default git-send-email does not accept patch which is contain lines longer\n>>>> than 998 symbols. Sometime it's inconvenient, i.e. you have a long list in one\n> <snip>\n>>> As a curiosity, why is such a check even neccessary?\n>> I'm not an author of that strange check (possible it's somehow related\n>> to b8ebe08b9a643f432866eb7150c3b20d59b755f2)\n> \n> I can't seem to find that changeset, however the reason why I asked is\n> because I thought I remembered that some mail clients could crash if\n> they got lines longer than that, and we should cater for that even if\n> those clients should handle mails better than that!  Apparently it's\n> specified in the relevant RFC2822, and this particular solution has\n> already been contributed as:\n> https://kerneltrap.org/mailarchive/git/2008/1/18/579779\n> \n\nWell, there's quite a lot of arguing following that mail, and it\ndoesn't seem to end with a final decision.\n\n> I would be inclined to suggest that such patches should be sent as an\n> attachment instead?\n\nNo, that would be bad. Many communities (git included) discard\npatches that aren't sent inline unless that's for a very good reason\n(translation patches are almost always inline, as they tend to break\nstuff for people who lack the proper encoding).\n\n> While patches should be sent inline to encourage discussion of the\n> patch, if the patch has such insanely long lines, the probability that\n> the bulk of your audience in having a good email client that doesn't\n> mangle your patch may become rather low.\n> \n\nReviewable source-code doesn't contain lines longer than 100 or so lines\nanyway, so we might as well break on some arbitrary (say, 200) width\nand ask the user to resubmit with the \"--attach\" option if they really\nwant to send their patch.\n\n-- \nAndreas Ericsson                   andreas.ericsson@op5.se\nOP5 AB                             www.op5.se\nTel: +46 8-230225                  Fax: +46 8-230231\n"},{"id":"96325","messageId":"20081121115813.GB3747@sigill.intra.peff.net","threadId":"16422","inReplyTo":"1227261564-13268-1-git-send-email-andy.shevchenko@gmail.com","subject":"Re: [PATCH] git-send-email: provide hook to send lines more than 998 symbols","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2008-11-21T11:58:13Z","receivedAt":"2008-11-21T11:58:13Z","isPatch":true,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Fri, Nov 21, 2008 at 11:59:24AM +0200, Andy Shevchenko wrote:\n\n> By default git-send-email does not accept patch which is contain lines longer\n> than 998 symbols. Sometime it's inconvenient, i.e. you have a long list in one\n> variable in shell script. So, define environment variable\n> GIT_SEND_EMAIL_LONGLINE to something to avoid that restriction.\n\nThis already exists as \"git send-email --no-validate\", which\nunfortunately doesn't seem to be documented. Care to send in a\ndocumentation patch instead?\n\n-Peff\n"},{"id":"96326","messageId":"20081121120435.GC3747@sigill.intra.peff.net","threadId":"16422","inReplyTo":"5ec8ebd50811210237kd6f9341q23bc69b6ffcc2a87@mail.gmail.com","subject":"Re: [PATCH] git-send-email: provide hook to send lines more than 998 symbols","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2008-11-21T12:04:35Z","receivedAt":"2008-11-21T12:04:35Z","isPatch":true,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Fri, Nov 21, 2008 at 12:37:08PM +0200, Andy Shevchenko wrote:\n\n> > As a curiosity, why is such a check even neccessary?\n> I'm not an author of that strange check (possible it's somehow related\n> to b8ebe08b9a643f432866eb7150c3b20d59b755f2)\n\nI am the author, and it was a direct response to a user who had\nsomething in his mail path munging overly long lines (which are, in\nfact, disallowed by rfc 2822).\n\nRead this thread:\n\n  http://thread.gmane.org/gmane.comp.version-control.git/70847\n\nwhich contains the problem report and the patches. We could take this\none step further (but didn't at the time) by QP-encoding the body part\nwith long lines, which is what a normal MUA would do. Since the\nreceiving tools for git handle this situation, it should work fine. I\nthink such a patch would be welcome.\n\n-Peff\n"},{"id":"96335","messageId":"4926AE4E.5000604@drmicha.warpmail.net","threadId":"16422","inReplyTo":"20081121115813.GB3747@sigill.intra.peff.net","subject":"Re: [PATCH] git-send-email: provide hook to send lines more than 998 symbols","fromName":"Michael J Gruber","fromEmail":"git@drmicha.warpmail.net","sentAt":"2008-11-21T12:49:18Z","receivedAt":"2008-11-21T12:49:18Z","isPatch":true,"sender":{"key":"git@grubix.eu","avatar":"https://avatars.githubusercontent.com/u/233215?v=4"},"body":"Jeff King venit, vidit, dixit 21.11.2008 12:58:\n> On Fri, Nov 21, 2008 at 11:59:24AM +0200, Andy Shevchenko wrote:\n> \n>> By default git-send-email does not accept patch which is contain lines longer\n>> than 998 symbols. Sometime it's inconvenient, i.e. you have a long list in one\n>> variable in shell script. So, define environment variable\n>> GIT_SEND_EMAIL_LONGLINE to something to avoid that restriction.\n> \n> This already exists as \"git send-email --no-validate\", which\n> unfortunately doesn't seem to be documented. Care to send in a\n> documentation patch instead?\n\nIn fact it is documented in git-send-email.txt:\n\n--[no-]validate::\n        Perform sanity checks on patches.\n        Currently, validation means the following:\n+\n--\n                *       Warn of patches that contain lines longer than\n998 characters; this\n                        is due to SMTP limits as described by\nhttp://www.ietf.org/rfc/rfc2821.txt.\n--\n+\nDefault is the value of 'sendemail.validate'; if this is not set,\ndefault to '--validate'.\n\n\nCheers,\nMichael\n"},{"id":"96338","messageId":"5ec8ebd50811210529q3b97c977y5d880502aa111e3c@mail.gmail.com","threadId":"16422","inReplyTo":"4926AE4E.5000604@drmicha.warpmail.net","subject":"Re: [PATCH] git-send-email: provide hook to send lines more than 998 symbols","fromName":"Andy Shevchenko","fromEmail":"andy.shevchenko@gmail.com","sentAt":"2008-11-21T13:29:34Z","receivedAt":"2008-11-21T13:29:34Z","isPatch":true,"sender":{"key":"andy.shevchenko@gmail.com","avatar":"https://gravatar.com/avatar/e7fccbe23f198167f8b4c119a3a8729d3cec5b3268293ffe07ee15a50c39938b?d=mp&s=160"},"body":"On Fri, Nov 21, 2008 at 2:49 PM, Michael J Gruber\n<git@drmicha.warpmail.net> wrote:\n> In fact it is documented in git-send-email.txt:\n> --[no-]validate::\nThat is I found just after I have sent the first email.\n\nP.S. Thanks for all, patch is wrong.\n\n-- \nWith Best Regards,\nAndy Shevchenko\n"},{"id":"96342","messageId":"20081121140803.GA32323@coredump.intra.peff.net","threadId":"16422","inReplyTo":"4926AE4E.5000604@drmicha.warpmail.net","subject":"Re: [PATCH] git-send-email: provide hook to send lines more than 998 symbols","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2008-11-21T14:08:04Z","receivedAt":"2008-11-21T14:08:04Z","isPatch":true,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Fri, Nov 21, 2008 at 01:49:18PM +0100, Michael J Gruber wrote:\n\n> In fact it is documented in git-send-email.txt:\n> \n> --[no-]validate::\n>         Perform sanity checks on patches.\n>         Currently, validation means the following:\n\nOh, right. Sorry, I stupidly looked at an older installed manpage\ninstead of going right to the source. So yes, it is documented.\n\n-Peff\n"}]}