{"thread":{"id":"22559","subject":"[PATCH] Documentation/SubmittingPatches: fix Gmail workaround advice","startedAt":"2010-02-07T15:14:02Z","lastAt":"2010-02-08T17:42:55Z","messageCount":7,"participants":["Aaron Crane","Jay Soffian","Junio C Hamano","Jonathan Nieder"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"133874","messageId":"1265555642-40204-1-git-send-email-git@aaroncrane.co.uk","threadId":"22559","inReplyTo":null,"subject":"[PATCH] Documentation/SubmittingPatches: fix Gmail workaround advice","fromName":"Aaron Crane","fromEmail":"git@aaroncrane.co.uk","sentAt":"2010-02-07T15:14:02Z","receivedAt":"2010-02-07T15:14:02Z","isPatch":true,"sender":{"key":"git@aaroncrane.co.uk","avatar":null},"body":"The suggested approach to dealing with Gmail's propensity for breaking\npatches doesn't seem to work.  Recommend an alternative technique which\ndoes.\n\nSigned-off-by: Aaron Crane <git@aaroncrane.co.uk>\n---\nThanks to Sverre Rabbelier, Jacob Helwig, David Aguilar, and Jay Soffian for\ntheir suggestions; the advice here comes from them.\n\n Documentation/SubmittingPatches |   88 +++++++++++++++++++++++++--------------\n 1 files changed, 56 insertions(+), 32 deletions(-)\n\ndiff --git a/Documentation/SubmittingPatches b/Documentation/SubmittingPatches\nindex c686f86..4d3c45f 100644\n--- a/Documentation/SubmittingPatches\n+++ b/Documentation/SubmittingPatches\n@@ -517,35 +517,59 @@ message, complete the addressing and subject fields, and press send.\n Gmail\n -----\n \n-GMail does not appear to have any way to turn off line wrapping in the web\n-interface, so this will mangle any emails that you send.  You can however\n-use any IMAP email client to connect to the google imap server, and forward\n-the emails through that.  Just make sure to disable line wrapping in that\n-email client.  Alternatively, use \"git send-email\" instead.\n-\n-Submitting properly formatted patches via Gmail is simple now that\n-IMAP support is available. First, edit your ~/.gitconfig to specify your\n-account settings:\n-\n-[imap]\n-\tfolder = \"[Gmail]/Drafts\"\n-\thost = imaps://imap.gmail.com\n-\tuser = user@gmail.com\n-\tpass = p4ssw0rd\n-\tport = 993\n-\tsslverify = false\n-\n-You might need to instead use: folder = \"[Google Mail]/Drafts\" if you get an error\n-that the \"Folder doesn't exist\".\n-\n-Next, ensure that your Gmail settings are correct. In \"Settings\" the\n-\"Use Unicode (UTF-8) encoding for outgoing messages\" should be checked.\n-\n-Once your commits are ready to send to the mailing list, run the following\n-command to send the patch emails to your Gmail Drafts folder.\n-\n-\t$ git format-patch -M --stdout origin/master | git imap-send\n-\n-Go to your Gmail account, open the Drafts folder, find the patch email, fill\n-in the To: and CC: fields and send away!\n-\n+Gmail does not appear to have any way to turn off line wrapping in the web\n+interface, so this will mangle any emails that you send.  Nor can you use\n+\"git imap-send\" to upload an email to your Drafts folder; the web interface\n+will still mangle your message when you send it.\n+\n+The best approach is to send the email using Gmail's SMTP submission\n+servers.  Configuring \"git send-email\" to do that looks like this:\n+\n+    [sendemail]\n+        smtpencryption = tls\n+        smtpserver = smtp.gmail.com\n+        smtpuser = [YOURADDRESSHERE]@gmail.com\n+        smtpserverport = 587\n+\n+Then sending will look like this:\n+\n+    $ git format-patch --no-color -C -M origin/master..topic -o outgoing/\n+    $ git send-email --compose outgoing/00*\n+\n+\"git send-email\" will then prompt you for your password.\n+\n+However, \"git send-email\" needs the Net::SMTP::SSL Perl module to send to\n+TLS-encrypted servers.  On some operating systems (like Mac OS X with\n+MacPorts), it may be hard to install that module.  In such cases, the\n+third-party \"msmtp\" program might be easier to install.  If so, configure\n+\"git send-email\" like this:\n+\n+    [sendemail]\n+        smtpserver = /opt/local/bin/msmtp\n+        # adjust the path if necessary\n+\n+and then configure msmtp to use the Gmail servers, in your ~/.msmtprc file:\n+\n+    # Set default values for all following accounts\n+    defaults\n+    tls on\n+    tls_trust_file /opt/local/share/curl/curl-ca-bundle.crt\n+        # with MacPorts, install the curl-ca-bundle port for this file\n+\n+    # Configure a \"gmail\" account\n+    account gmail\n+    host smtp.gmail.com\n+    port 587\n+    from [YOURADDRESSHERE]@gmail.com\n+    auth on\n+    user [YOURADDRESSHERE]@gmail.com\n+\n+    # Set the \"gmail\" account as the default\n+    account default : gmail\n+\n+If you're using either Gnome or Mac OS X, msmtp will look up your password\n+from your OS keychain; otherwise, or if that fails, it prompts you for your\n+password.\n+\n+For more details, see\n+http://git.wiki.kernel.org/index.php/GitTips#Using_gmail_to_send_your_patches\n-- \n1.6.6.1\n"},{"id":"133876","messageId":"76718491002071001l7dee7c4fr64cf2e57072b184@mail.gmail.com","threadId":"22559","inReplyTo":"1265555642-40204-1-git-send-email-git@aaroncrane.co.uk","subject":"Re: [PATCH] Documentation/SubmittingPatches: fix Gmail workaround advice","fromName":"Jay Soffian","fromEmail":"jaysoffian@gmail.com","sentAt":"2010-02-07T18:01:13Z","receivedAt":"2010-02-07T18:01:13Z","isPatch":true,"sender":{"key":"jaysoffian@gmail.com","avatar":"https://avatars.githubusercontent.com/u/155970?v=4"},"body":"On Sun, Feb 7, 2010 at 10:14 AM, Aaron Crane <git@aaroncrane.co.uk> wrote:\n> The suggested approach to dealing with Gmail's propensity for breaking\n> patches doesn't seem to work.  Recommend an alternative technique which\n> does.\n>\n> Signed-off-by: Aaron Crane <git@aaroncrane.co.uk>\n> ---\n\nThanks for writing this up. See inline.\n\n> +However, \"git send-email\" needs the Net::SMTP::SSL Perl module to send to\n> +TLS-encrypted servers.  On some operating systems (like Mac OS X with\n> +MacPorts), it may be hard to install that module.  In such cases, the\n> +third-party \"msmtp\" program might be easier to install.\n\nNeither is harder to install than the other, I use msmtp primarily for\nhistorical reasons (git didn't used to support SMTP over SSL/TLS) and\nbecause it doesn't prompt me for my password. :-)\n\nSo I'd just say:\n\n\"Note that \"git send-email\" needs the Net::SMTP::SSL Perl module to\nsend to TLS-encrypted servers.  Alternately, git can make use of the\nthird-party \"msmtp\" program like so:\"\n\nThanks,\n\nj.\n"},{"id":"133877","messageId":"7v8wb4gaef.fsf@alter.siamese.dyndns.org","threadId":"22559","inReplyTo":"1265555642-40204-1-git-send-email-git@aaroncrane.co.uk","subject":"Re: [PATCH] Documentation/SubmittingPatches: fix Gmail workaround advice","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2010-02-07T18:37:12Z","receivedAt":"2010-02-07T18:37:12Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Aaron Crane <git@aaroncrane.co.uk> writes:\n\n> The suggested approach to dealing with Gmail's propensity for breaking\n> patches doesn't seem to work.  Recommend an alternative technique which\n> does.\n>\n> Signed-off-by: Aaron Crane <git@aaroncrane.co.uk>\n> ---\n> Thanks to Sverre Rabbelier, Jacob Helwig, David Aguilar, and Jay Soffian for\n> their suggestions; the advice here comes from them.\n\nDo you know _why_ it does not work?  For example, does it not work _at\nall_ for you?  Or only certain things does not reliably work (iow, perhaps\nyou are seeing a bug in imap-send)?  We might want to find who wrote the\nimap-send recommendation and ask their input.\n\nWhat I am trying to get at is to see if the current imap-send suggestion\nis fundamentally unworkable with gmail.  Perhaps they stopped supporting\nimap.  Perhaps the procedure never worked.  I would be very happy to apply\nyour patch as is if that is the case.\n\nBut if the trouble you had is something fixable, I think removal of the\noriginal text is unfriendly to people who have only imap reachability to\ngmail---the description instead needs fixing.\n"},{"id":"133884","messageId":"bc341e101002071203x52bceaach8d42c6188630f1d1@mail.gmail.com","threadId":"22559","inReplyTo":"7v8wb4gaef.fsf@alter.siamese.dyndns.org","subject":"Re: [PATCH] Documentation/SubmittingPatches: fix Gmail workaround advice","fromName":"Aaron Crane","fromEmail":"git@aaroncrane.co.uk","sentAt":"2010-02-07T20:03:31Z","receivedAt":"2010-02-07T20:03:31Z","isPatch":true,"sender":{"key":"git@aaroncrane.co.uk","avatar":null},"body":"Junio C Hamano <gitster@pobox.com> wrote:\n> Aaron Crane <git@aaroncrane.co.uk> writes:\n>> The suggested approach to dealing with Gmail's propensity for breaking\n>> patches doesn't seem to work.  Recommend an alternative technique which\n>> does.\n>\n> Do you know _why_ it does not work?  For example, does it not work _at\n> all_ for you?  Or only certain things does not reliably work (iow, perhaps\n> you are seeing a bug in imap-send)?\n\nWhat happens for me is that `git imap-send` successfully puts the\nmessage into the gmail Drafts folder, but when it's sent it's been\nline-wrapped (and any line-end spaces are deleted, which breaks diffs\ncontaining empty context lines).\n\nI've verified that it's not `git imap-send` at fault, by tweaking it\nto tee all socket-written data to a local file; all whitespace in the\nmail prepared locally is sent to Gmail unchanged.  So Gmail is\nmangling the message when it gets uploaded (or possibly when it's\nopened in the web interface, or when it's sent).\n\nI've tried this both with a vanilla Gmail account, and with Google\nApps For Your Domain Standard Edition, and I get the same behaviour.\n\n> What I am trying to get at is to see if the current imap-send suggestion\n> is fundamentally unworkable with gmail.  Perhaps they stopped supporting\n> imap.  Perhaps the procedure never worked.\n\nAs far as I can determine, the current imap-send suggestion is\nfundamentally unworkable with gmail at the moment.  I don't know\nwhether it ever used to work, though I've been assuming that it did.\n\n-- \nAaron Crane ** http://aaroncrane.co.uk/\n"},{"id":"133893","messageId":"20100207215311.GA2177@progeny.tock","threadId":"22559","inReplyTo":"bc341e101002071203x52bceaach8d42c6188630f1d1@mail.gmail.com","subject":"Re: [PATCH] Documentation/SubmittingPatches: fix Gmail workaround advice","fromName":"Jonathan Nieder","fromEmail":"jrnieder@gmail.com","sentAt":"2010-02-07T21:54:28Z","receivedAt":"2010-02-07T21:54:28Z","isPatch":true,"sender":{"key":"jrnieder@gmail.com","avatar":"https://avatars.githubusercontent.com/u/281595?v=4"},"body":"Aaron Crane wrote:\n> Junio C Hamano <gitster@pobox.com> wrote:\n\n>> What I am trying to get at is to see if the current imap-send suggestion\n>> is fundamentally unworkable with gmail.  Perhaps they stopped supporting\n>> imap.  Perhaps the procedure never worked.\n>\n> As far as I can determine, the current imap-send suggestion is\n> fundamentally unworkable with gmail at the moment.  I don't know\n> whether it ever used to work, though I've been assuming that it did.\n\nI think it still works, or depending on your perspective, it never did.\nAs John Tapsell wrote in SubmittingPatches (commit 50dffd4e, 2009-02-19):\n\n| GMail does not appear to have any way to turn off line wrapping in the web\n| interface, so this will mangle any emails that you send.  You can however\n| use any IMAP email client to connect to the google imap server, and forward\n| the emails through that.  Just make sure to disable line wrapping in that\n| email client.  Alternatively, use \"git send-email\" instead.\n\nI am not sure what that means about what SubmittingPatches should say:\nshould it explain both methods, then?\n\nIf I were doing it, I would put the information in the git-imap-send and\ngit-send-mail man pages as examples.  That way, it would be visible for\npeople submitting patches to _other_ projects, too.  The section in\nDocumentation/SubmittingPatches could be replaced with a pointer.\n\nJonathan\n"},{"id":"133894","messageId":"20100207221645.GA2862@progeny.tock","threadId":"22559","inReplyTo":"20100207215311.GA2177@progeny.tock","subject":"Re: [PATCH] Documentation/SubmittingPatches: fix Gmail workaround advice","fromName":"Jonathan Nieder","fromEmail":"jrnieder@gmail.com","sentAt":"2010-02-07T22:16:45Z","receivedAt":"2010-02-07T22:16:45Z","isPatch":true,"sender":{"key":"jrnieder@gmail.com","avatar":"https://avatars.githubusercontent.com/u/281595?v=4"},"body":"Jonathan Nieder wrote:\n> Aaron Crane wrote:\n\n>> As far as I can determine, the current imap-send suggestion is\n>> fundamentally unworkable with gmail at the moment.  I don't know\n>> whether it ever used to work, though I've been assuming that it did.\n>\n> I think it still works, or depending on your perspective, it never did.\n\nScratch that: it looks like it once did.\n\nhttp://thread.gmane.org/gmane.comp.version-control.git/99721/focus=99775\n\nTom, any clues?  Are you still able to avoid spurious line wrapping in\ngmail?\n\nJonathan\n"},{"id":"133932","messageId":"7veikvpqsg.fsf@alter.siamese.dyndns.org","threadId":"22559","inReplyTo":"20100207221645.GA2862@progeny.tock","subject":"Re: [PATCH] Documentation/SubmittingPatches: fix Gmail workaround advice","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2010-02-08T17:42:55Z","receivedAt":"2010-02-08T17:42:55Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Jonathan Nieder <jrnieder@gmail.com> writes:\n\n> Scratch that: it looks like it once did.\n>\n> http://thread.gmane.org/gmane.comp.version-control.git/99721/focus=99775\n>\n> Tom, any clues?  Are you still able to avoid spurious line wrapping in\n> gmail?\n\nThe example Tom cites $gmane/99759 does not have long enough lines to be\nlinewrapped, so perhaps the problem was there from day one but was not\nnoticed.\n\nI just tried it myself (I don't even regularly use Gmail), following the\nprocedure outlined in SubmittingPatches.  It does look like Gmail web\ninterface mangles longer lines in the message.\n"}]}