@matheusbsbs / matheus-bagliano / commits / 36c10e6d75
Fork 0

Documentation: publicize hints for sending patches with GMail

The hints in SubmittingPatches about stopping GMail from clobbering patches are widely useful both as examples of "git send-email" and "git imap-send" usage. Move the documentation to the appropriate places. While at it, don't encourage storing passwords in config files. Signed-off-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Jonathan Nieder committed Apr 14, 2011 at 21:33 UTC 36c10e6d7543f9f35295df0113b0c250ad421eb4
4 files changed +61 -55
Documentation/SubmittingPatches
+2 -52
@@ -413,8 +413,8 @@ that or Gentoo did it.) So you need to set the
413 it.
414
415
416 -Thunderbird, KMail
417 -------------------
416 +Thunderbird, KMail, GMail
417 +-------------------------
418
419 See the MUA-SPECIFIC HINTS section of git-format-patch(1).
420
@@ -431,53 +431,3 @@ characters (most notably in people's names), and also
431 whitespaces (fatal in patches). Running 'C-u g' to display the
432 message in raw form before using '|' to run the pipe can work
433 this problem around.
434 -
435 -
436 -Gmail
437 ------
438 -
439 -GMail does not appear to have any way to turn off line wrapping in the web
440 -interface, so this will mangle any emails that you send. You can however
441 -use "git send-email" and send your patches through the GMail SMTP server, or
442 -use any IMAP email client to connect to the google IMAP server and forward
443 -the emails through that.
444 -
445 -To use "git send-email" and send your patches through the GMail SMTP server,
446 -edit ~/.gitconfig to specify your account settings:
447 -
448 -[sendemail]
449 - smtpencryption = tls
450 - smtpserver = smtp.gmail.com
451 - smtpuser = user@gmail.com
452 - smtppass = p4ssw0rd
453 - smtpserverport = 587
454 -
455 -Once your commits are ready to be sent to the mailing list, run the
456 -following commands:
457 -
458 - $ git format-patch --cover-letter -M origin/master -o outgoing/
459 - $ edit outgoing/0000-*
460 - $ git send-email outgoing/*
461 -
462 -To submit using the IMAP interface, first, edit your ~/.gitconfig to specify your
463 -account settings:
464 -
465 -[imap]
466 - folder = "[Gmail]/Drafts"
467 - host = imaps://imap.gmail.com
468 - user = user@gmail.com
469 - pass = p4ssw0rd
470 - port = 993
471 - sslverify = false
472 -
473 -You might need to instead use: folder = "[Google Mail]/Drafts" if you get an error
474 -that the "Folder doesn't exist".
475 -
476 -Once your commits are ready to be sent to the mailing list, run the
477 -following commands:
478 -
479 - $ git format-patch --cover-letter -M --stdout origin/master | git imap-send
480 -
481 -Just make sure to disable line wrapping in the email client (GMail web
482 -interface will line wrap no matter what, so you need to use a real
483 -IMAP client).
Documentation/git-format-patch.txt
+14
@@ -337,6 +337,20 @@ MUA-SPECIFIC HINTS
337 Here are some hints on how to successfully submit patches inline using
338 various mailers.
339
340 +GMail
341 +~~~~~
342 +GMail does not have any way to turn off line wrapping in the web
343 +interface, so it will mangle any emails that you send. You can however
344 +use "git send-email" and send your patches through the GMail SMTP server, or
345 +use any IMAP email client to connect to the google IMAP server and forward
346 +the emails through that.
347 +
348 +For hints on using 'git send-email' to send your patches through the
349 +GMail SMTP server, see the EXAMPLE section of linkgit:git-send-email[1].
350 +
351 +For hints on submission using the IMAP interface, see the EXAMPLE
352 +section of linkgit:git-imap-send[1].
353 +
354 Thunderbird
355 ~~~~~~~~~~~
356 By default, Thunderbird will both wrap emails as well as flag
Documentation/git-imap-send.txt
+29
@@ -111,6 +111,31 @@ Using direct mode with SSL:
111 ..........................
112
113
114 +EXAMPLE
115 +-------
116 +To submit patches using GMail's IMAP interface, first, edit your ~/.gitconfig
117 +to specify your account settings:
118 +
119 +---------
120 +[imap]
121 + folder = "[Gmail]/Drafts"
122 + host = imaps://imap.gmail.com
123 + user = user@gmail.com
124 + port = 993
125 + sslverify = false
126 +---------
127 +
128 +You might need to instead use: folder = "[Google Mail]/Drafts" if you get an error
129 +that the "Folder doesn't exist".
130 +
131 +Once the commits are ready to be sent, run the following command:
132 +
133 + $ git format-patch --cover-letter -M --stdout origin/master | git imap-send
134 +
135 +Just make sure to disable line wrapping in the email client (GMail's web
136 +interface will wrap lines no matter what, so you need to use a real
137 +IMAP client).
138 +
139 CAUTION
140 -------
141 It is still your responsibility to make sure that the email message
@@ -124,6 +149,10 @@ Thunderbird in particular is known to be problematic. Thunderbird
149 users may wish to visit this web page for more information:
150 http://kb.mozillazine.org/Plain_text_e-mail_-_Thunderbird#Completely_plain_email
151
152 +SEE ALSO
153 +--------
154 +linkgit:git-format-patch[1], linkgit:git-send-email[1], mbox(5)
155 +
156 GIT
157 ---
158 Part of the linkgit:git[1] suite
Documentation/git-send-email.txt
+16 -3
@@ -348,10 +348,12 @@ sendemail.confirm::
348 one of 'always', 'never', 'cc', 'compose', or 'auto'. See '--confirm'
349 in the previous section for the meaning of these values.
350
351 +EXAMPLE
352 +-------
353 Use gmail as the smtp server
352 -----------------------------
353 -
354 -Add the following section to the config file:
354 +~~~~~~~~~~~~~~~~~~~~~~~~~~~~
355 +To use 'git send-email' to send your patches through the GMail SMTP server,
356 +edit ~/.gitconfig to specify your account settings:
357
358 [sendemail]
359 smtpencryption = tls
@@ -359,9 +361,20 @@ Add the following section to the config file:
361 smtpuser = yourname@gmail.com
362 smtpserverport = 587
363
364 +Once your commits are ready to be sent to the mailing list, run the
365 +following commands:
366 +
367 + $ git format-patch --cover-letter -M origin/master -o outgoing/
368 + $ edit outgoing/0000-*
369 + $ git send-email outgoing/*
370 +
371 Note: the following perl modules are required
372 Net::SMTP::SSL, MIME::Base64 and Authen::SASL
373
374 +SEE ALSO
375 +--------
376 +linkgit:git-format-patch[1], linkgit:git-imap-send[1], mbox(5)
377 +
378 GIT
379 ---
380 Part of the linkgit:git[1] suite