Skip to content

Commit d5c5274

Browse files
committed
Merge branch 'mw/sendemail'
* mw/sendemail: bash completion: Add --[no-]validate to "git send-email" send-email: signedoffcc -> signedoffbycc, but handle both Docs: send-email: Create logical groupings for man text Docs: send-email: Create logical groupings for --help text Docs: send-email: Remove unnecessary config variable description Docs: send-email: --chain_reply_to -> --[no-]chain-reply-to send-email: change --no-validate to boolean --[no-]validate Docs: send-email: Man page option ordering Docs: send-email usage text much sexier Docs: send-email's usage text and man page mention same options
2 parents 76c3fb1 + fd3a8dc commit d5c5274

File tree

3 files changed

+147
-215
lines changed

3 files changed

+147
-215
lines changed

Documentation/git-send-email.txt

Lines changed: 103 additions & 139 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ SYNOPSIS
1111
'git send-email' [options] <file|directory> [... file|directory]
1212

1313

14-
1514
DESCRIPTION
1615
-----------
1716
Takes the patches given on the command line and emails them out.
@@ -20,12 +19,16 @@ The header of the email is configurable by command line options. If not
2019
specified on the command line, the user will be prompted with a ReadLine
2120
enabled interface to provide the necessary information.
2221

22+
2323
OPTIONS
2424
-------
25-
The options available are:
25+
26+
Composing
27+
~~~~~~~~~
2628

2729
--bcc::
28-
Specify a "Bcc:" value for each email.
30+
Specify a "Bcc:" value for each email. Default is the value of
31+
'sendemail.bcc'.
2932
+
3033
The --bcc option must be repeated for each user you want on the bcc list.
3134

@@ -34,22 +37,6 @@ The --bcc option must be repeated for each user you want on the bcc list.
3437
+
3538
The --cc option must be repeated for each user you want on the cc list.
3639

37-
--cc-cmd::
38-
Specify a command to execute once per patch file which
39-
should generate patch file specific "Cc:" entries.
40-
Output of this command must be single email address per line.
41-
Default is the value of 'sendemail.cccmd' configuration value.
42-
43-
--chain-reply-to::
44-
--no-chain-reply-to::
45-
If this is set, each email will be sent as a reply to the previous
46-
email sent. If disabled with "--no-chain-reply-to", all emails after
47-
the first will be sent as replies to the first email sent. When using
48-
this, it is recommended that the first file given be an overview of the
49-
entire patch series.
50-
Default is the value of the 'sendemail.chainreplyto' configuration
51-
value; if that is unspecified, default to --chain-reply-to.
52-
5340
--compose::
5441
Use $GIT_EDITOR, core.editor, $VISUAL, or $EDITOR to edit an
5542
introductory message for the patch series.
@@ -66,22 +53,47 @@ The --cc option must be repeated for each user you want on the cc list.
6653
Only necessary if --compose is also set. If --compose
6754
is not set, this will be prompted for.
6855

69-
--signed-off-by-cc::
70-
--no-signed-off-by-cc::
71-
If this is set, add emails found in Signed-off-by: or Cc: lines to the
72-
cc list.
73-
Default is the value of 'sendemail.signedoffcc' configuration value;
74-
if that is unspecified, default to --signed-off-by-cc.
56+
--subject::
57+
Specify the initial subject of the email thread.
58+
Only necessary if --compose is also set. If --compose
59+
is not set, this will be prompted for.
60+
61+
--to::
62+
Specify the primary recipient of the emails generated. Generally, this
63+
will be the upstream maintainer of the project involved. Default is the
64+
value of the 'sendemail.to' configuration value; if that is unspecified,
65+
this will be prompted for.
66+
+
67+
The --to option must be repeated for each user you want on the to list.
7568

76-
--quiet::
77-
Make git-send-email less verbose. One line per email should be
78-
all that is output.
7969

80-
--identity::
81-
A configuration identity. When given, causes values in the
82-
'sendemail.<identity>' subsection to take precedence over
83-
values in the 'sendemail' section. The default identity is
84-
the value of 'sendemail.identity'.
70+
Sending
71+
~~~~~~~
72+
73+
--envelope-sender::
74+
Specify the envelope sender used to send the emails.
75+
This is useful if your default address is not the address that is
76+
subscribed to a list. If you use the sendmail binary, you must have
77+
suitable privileges for the -f parameter. Default is the value of
78+
the 'sendemail.envelopesender' configuration variable; if that is
79+
unspecified, choosing the envelope sender is left to your MTA.
80+
81+
--smtp-encryption::
82+
Specify the encryption to use, either 'ssl' or 'tls'. Any other
83+
value reverts to plain SMTP. Default is the value of
84+
'sendemail.smtpencryption'.
85+
86+
--smtp-pass::
87+
Password for SMTP-AUTH. The argument is optional: If no
88+
argument is specified, then the empty string is used as
89+
the password. Default is the value of 'sendemail.smtppass',
90+
however '--smtp-pass' always overrides this value.
91+
+
92+
Furthermore, passwords need not be specified in configuration files
93+
or on the command line. If a username has been specified (with
94+
'--smtp-user' or a 'sendemail.smtpuser'), but no password has been
95+
specified (with '--smtp-pass' or 'sendemail.smtppass'), then the
96+
user is prompted for a password while the input is masked for privacy.
8597

8698
--smtp-server::
8799
If set, specifies the outgoing SMTP server to use (e.g.
@@ -96,61 +108,44 @@ The --cc option must be repeated for each user you want on the cc list.
96108
--smtp-server-port::
97109
Specifies a port different from the default port (SMTP
98110
servers typically listen to smtp port 25 and ssmtp port
99-
465).
111+
465). This can be set with 'sendemail.smtpserverport'.
112+
113+
--smtp-ssl::
114+
Legacy alias for '--smtp-encryption ssl'.
100115

101116
--smtp-user::
102-
Username for SMTP-AUTH. In place of this option, the following
103-
configuration variables can be specified:
104-
+
105-
--
106-
* sendemail.smtpuser
107-
* sendemail.<identity>.smtpuser (see sendemail.identity).
108-
--
109-
+
110-
However, --smtp-user always overrides these variables.
111-
+
112-
If a username is not specified (with --smtp-user or a
113-
configuration variable), then authentication is not attempted.
117+
Username for SMTP-AUTH. Default is the value of 'sendemail.smtpuser';
118+
if a username is not specified (with '--smtp-user' or 'sendemail.smtpuser'),
119+
then authentication is not attempted.
114120

115-
--smtp-pass::
116-
Password for SMTP-AUTH. The argument is optional: If no
117-
argument is specified, then the empty string is used as
118-
the password.
119-
+
120-
In place of this option, the following configuration variables
121-
can be specified:
122-
+
123-
--
124-
* sendemail.smtppass
125-
* sendemail.<identity>.smtppass (see sendemail.identity).
126-
--
127-
+
128-
However, --smtp-pass always overrides these variables.
129-
+
130-
Furthermore, passwords need not be specified in configuration files
131-
or on the command line. If a username has been specified (with
132-
--smtp-user or a configuration variable), but no password has been
133-
specified (with --smtp-pass or a configuration variable), then the
134-
user is prompted for a password while the input is masked for privacy.
135121

136-
--smtp-encryption::
137-
Specify the encryption to use, either 'ssl' or 'tls'. Any other
138-
value reverts to plain SMTP. Default is the value of
139-
'sendemail.smtpencryption'.
122+
Automating
123+
~~~~~~~~~~
140124

141-
--smtp-ssl::
142-
Legacy alias for '--smtp-encryption=ssl'.
125+
--cc-cmd::
126+
Specify a command to execute once per patch file which
127+
should generate patch file specific "Cc:" entries.
128+
Output of this command must be single email address per line.
129+
Default is the value of 'sendemail.cccmd' configuration value.
143130

144-
--subject::
145-
Specify the initial subject of the email thread.
146-
Only necessary if --compose is also set. If --compose
147-
is not set, this will be prompted for.
131+
--[no-]chain-reply-to::
132+
If this is set, each email will be sent as a reply to the previous
133+
email sent. If disabled with "--no-chain-reply-to", all emails after
134+
the first will be sent as replies to the first email sent. When using
135+
this, it is recommended that the first file given be an overview of the
136+
entire patch series. Default is the value of the 'sendemail.chainreplyto'
137+
configuration value; if that is unspecified, default to --chain-reply-to.
138+
139+
--identity::
140+
A configuration identity. When given, causes values in the
141+
'sendemail.<identity>' subsection to take precedence over
142+
values in the 'sendemail' section. The default identity is
143+
the value of 'sendemail.identity'.
148144

149-
--suppress-from::
150-
--no-suppress-from::
151-
If this is set, do not add the From: address to the cc: list.
152-
Default is the value of 'sendemail.suppressfrom' configuration value;
153-
if that is unspecified, default to --no-suppress-from.
145+
--[no-]signed-off-by-cc::
146+
If this is set, add emails found in Signed-off-by: or Cc: lines to the
147+
cc list. Default is the value of 'sendemail.signedoffbycc' configuration
148+
value; if that is unspecified, default to --signed-off-by-cc.
154149

155150
--suppress-cc::
156151
Specify an additional category of recipients to suppress the
@@ -163,44 +158,43 @@ user is prompted for a password while the input is masked for privacy.
163158
if that is unspecified, default to 'self' if --suppress-from is
164159
specified, as well as 'sob' if --no-signed-off-cc is specified.
165160

166-
--thread::
167-
--no-thread::
161+
--[no-]suppress-from::
162+
If this is set, do not add the From: address to the cc: list.
163+
Default is the value of 'sendemail.suppressfrom' configuration
164+
value; if that is unspecified, default to --no-suppress-from.
165+
166+
--[no-]thread::
168167
If this is set, the In-Reply-To header will be set on each email sent.
169168
If disabled with "--no-thread", no emails will have the In-Reply-To
170-
header set.
171-
Default is the value of the 'sendemail.thread' configuration value;
172-
if that is unspecified, default to --thread.
169+
header set. Default is the value of the 'sendemail.thread' configuration
170+
value; if that is unspecified, default to --thread.
171+
172+
173+
Administering
174+
~~~~~~~~~~~~~
173175

174176
--dry-run::
175177
Do everything except actually send the emails.
176178

177-
--envelope-sender::
178-
Specify the envelope sender used to send the emails.
179-
This is useful if your default address is not the address that is
180-
subscribed to a list. If you use the sendmail binary, you must have
181-
suitable privileges for the -f parameter.
182-
Default is the value of the 'sendemail.envelopesender' configuration
183-
variable; if that is unspecified, choosing the envelope sender is left
184-
to your MTA.
179+
--quiet::
180+
Make git-send-email less verbose. One line per email should be
181+
all that is output.
185182

186-
--to::
187-
Specify the primary recipient of the emails generated.
188-
Generally, this will be the upstream maintainer of the
189-
project involved.
190-
Default is the value of the 'sendemail.to' configuration value;
191-
if that is unspecified, this will be prompted for.
183+
--[no-]validate::
184+
Perform sanity checks on patches.
185+
Currently, validation means the following:
192186
+
193-
The --to option must be repeated for each user you want on the to list.
187+
--
188+
* Warn of patches that contain lines longer than 998 characters; this
189+
is due to SMTP limits as described by http://www.ietf.org/rfc/rfc2821.txt.
190+
--
191+
+
192+
Default is the value of 'sendemail.validate'; if this is not set,
193+
default to '--validate'.
194194

195195

196196
CONFIGURATION
197197
-------------
198-
sendemail.identity::
199-
The default configuration identity. When specified,
200-
'sendemail.<identity>.<item>' will have higher precedence than
201-
'sendemail.<item>'. This is useful to declare multiple SMTP
202-
identities and to hoist sensitive authentication information
203-
out of the repository and into the global configuration file.
204198

205199
sendemail.aliasesfile::
206200
To avoid typing long email addresses, point this to one or more
@@ -210,38 +204,6 @@ sendemail.aliasfiletype::
210204
Format of the file(s) specified in sendemail.aliasesfile. Must be
211205
one of 'mutt', 'mailrc', 'pine', or 'gnus'.
212206

213-
sendemail.to::
214-
Email address (or alias) to always send to.
215-
216-
sendemail.cccmd::
217-
Command to execute to generate per patch file specific "Cc:"s.
218-
219-
sendemail.bcc::
220-
Email address (or alias) to always bcc.
221-
222-
sendemail.chainreplyto::
223-
Boolean value specifying the default to the '--chain_reply_to'
224-
parameter.
225-
226-
sendemail.smtpserver::
227-
Default SMTP server to use.
228-
229-
sendemail.smtpserverport::
230-
Default SMTP server port to use.
231-
232-
sendemail.smtpuser::
233-
Default SMTP-AUTH username.
234-
235-
sendemail.smtppass::
236-
Default SMTP-AUTH password.
237-
238-
sendemail.smtpencryption::
239-
Default encryption method. Use 'ssl' for SSL (and specify an
240-
appropriate port), or 'tls' for TLS. Takes precedence over
241-
'smtpssl' if both are specified.
242-
243-
sendemail.smtpssl::
244-
Legacy boolean that sets 'smtpencryption=ssl' if enabled.
245207

246208
Author
247209
------
@@ -250,10 +212,12 @@ Written by Ryan Anderson <[email protected]>
250212
git-send-email is originally based upon
251213
send_lots_of_email.pl by Greg Kroah-Hartman.
252214

215+
253216
Documentation
254217
--------------
255218
Documentation by Ryan Anderson
256219

220+
257221
GIT
258222
---
259223
Part of the linkgit:git[1] suite

contrib/completion/git-completion.bash

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1123,7 +1123,8 @@ _git_send_email ()
11231123
--no-suppress-from --no-thread --quiet
11241124
--signed-off-by-cc --smtp-pass --smtp-server
11251125
--smtp-server-port --smtp-ssl --smtp-user --subject
1126-
--suppress-cc --suppress-from --thread --to"
1126+
--suppress-cc --suppress-from --thread --to
1127+
--validate --no-validate"
11271128
return
11281129
;;
11291130
esac

0 commit comments

Comments
 (0)