Skip to content

Commit 36c10e6

Browse files
jrngitster
authored andcommitted
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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 967ab8e commit 36c10e6

File tree

4 files changed

+61
-55
lines changed

4 files changed

+61
-55
lines changed

Documentation/SubmittingPatches

Lines changed: 2 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -413,8 +413,8 @@ that or Gentoo did it.) So you need to set the
413413
it.
414414

415415

416-
Thunderbird, KMail
417-
------------------
416+
Thunderbird, KMail, GMail
417+
-------------------------
418418

419419
See the MUA-SPECIFIC HINTS section of git-format-patch(1).
420420

@@ -431,53 +431,3 @@ characters (most notably in people's names), and also
431431
whitespaces (fatal in patches). Running 'C-u g' to display the
432432
message in raw form before using '|' to run the pipe can work
433433
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 = [email protected]
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-
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

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -337,6 +337,20 @@ MUA-SPECIFIC HINTS
337337
Here are some hints on how to successfully submit patches inline using
338338
various mailers.
339339

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+
340354
Thunderbird
341355
~~~~~~~~~~~
342356
By default, Thunderbird will both wrap emails as well as flag

Documentation/git-imap-send.txt

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,31 @@ Using direct mode with SSL:
111111
..........................
112112

113113

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+
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+
114139
CAUTION
115140
-------
116141
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
124149
users may wish to visit this web page for more information:
125150
http://kb.mozillazine.org/Plain_text_e-mail_-_Thunderbird#Completely_plain_email
126151

152+
SEE ALSO
153+
--------
154+
linkgit:git-format-patch[1], linkgit:git-send-email[1], mbox(5)
155+
127156
GIT
128157
---
129158
Part of the linkgit:git[1] suite

Documentation/git-send-email.txt

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -348,20 +348,33 @@ sendemail.confirm::
348348
one of 'always', 'never', 'cc', 'compose', or 'auto'. See '--confirm'
349349
in the previous section for the meaning of these values.
350350

351+
EXAMPLE
352+
-------
351353
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:
355357

356358
[sendemail]
357359
smtpencryption = tls
358360
smtpserver = smtp.gmail.com
359361
smtpuser = [email protected]
360362
smtpserverport = 587
361363

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+
362371
Note: the following perl modules are required
363372
Net::SMTP::SSL, MIME::Base64 and Authen::SASL
364373

374+
SEE ALSO
375+
--------
376+
linkgit:git-format-patch[1], linkgit:git-imap-send[1], mbox(5)
377+
365378
GIT
366379
---
367380
Part of the linkgit:git[1] suite

0 commit comments

Comments
 (0)