From 7ecbad91e94c0552da9c8903e4ed004c4d6744e4 Mon Sep 17 00:00:00 2001 From: Michael Witten Date: Tue, 30 Sep 2008 07:58:24 -0500 Subject: [PATCH 01/10] Docs: send-email's usage text and man page mention same options Specifically, boolean options are now listed in the form --[no-]option and both forms of documentation now consistently use --[no-]signed-off-by-cc Signed-off-by: Michael Witten Acked-by: Jeff King Signed-off-by: Shawn O. Pearce --- Documentation/git-send-email.txt | 21 +++++++++++++-------- git-send-email.perl | 8 ++++---- 2 files changed, 17 insertions(+), 12 deletions(-) diff --git a/Documentation/git-send-email.txt b/Documentation/git-send-email.txt index 3c3e1b0e77..9b316267dc 100644 --- a/Documentation/git-send-email.txt +++ b/Documentation/git-send-email.txt @@ -40,8 +40,7 @@ The --cc option must be repeated for each user you want on the cc list. Output of this command must be single email address per line. Default is the value of 'sendemail.cccmd' configuration value. ---chain-reply-to:: ---no-chain-reply-to:: +--[no-]chain-reply-to:: If this is set, each email will be sent as a reply to the previous email sent. If disabled with "--no-chain-reply-to", all emails after the first will be sent as replies to the first email sent. When using @@ -66,8 +65,7 @@ The --cc option must be repeated for each user you want on the cc list. Only necessary if --compose is also set. If --compose is not set, this will be prompted for. ---signed-off-by-cc:: ---no-signed-off-by-cc:: +--[no-]signed-off-by-cc:: If this is set, add emails found in Signed-off-by: or Cc: lines to the cc list. Default is the value of 'sendemail.signedoffcc' configuration value; @@ -146,8 +144,7 @@ user is prompted for a password while the input is masked for privacy. Only necessary if --compose is also set. If --compose is not set, this will be prompted for. ---suppress-from:: ---no-suppress-from:: +--[no-]suppress-from:: If this is set, do not add the From: address to the cc: list. Default is the value of 'sendemail.suppressfrom' configuration value; if that is unspecified, default to --no-suppress-from. @@ -163,8 +160,7 @@ user is prompted for a password while the input is masked for privacy. if that is unspecified, default to 'self' if --suppress-from is specified, as well as 'sob' if --no-signed-off-cc is specified. ---thread:: ---no-thread:: +--[no-]thread:: If this is set, the In-Reply-To header will be set on each email sent. If disabled with "--no-thread", no emails will have the In-Reply-To header set. @@ -183,6 +179,15 @@ user is prompted for a password while the input is masked for privacy. variable; if that is unspecified, choosing the envelope sender is left to your MTA. +--no-validate:: + Don't perform any sanity checks on patches. + Currently, validation means the following: ++ +-- + * Warn of patches that contain lines longer than 998 characters; this + is due to SMTP limits as described by http://www.ietf.org/rfc/rfc2821.txt. +-- + --to:: Specify the primary recipient of the emails generated. Generally, this will be the upstream maintainer of the diff --git a/git-send-email.perl b/git-send-email.perl index d2fd899076..9f56162b1a 100755 --- a/git-send-email.perl +++ b/git-send-email.perl @@ -64,11 +64,11 @@ Options: Only used if --compose is also set. If --compose is not set, this will be prompted for. - --chain-reply-to If set, the replies will all be to the previous + --[no-]chain-reply-to If set, the replies will all be to the previous email sent, rather than to the first email sent. Defaults to on. - --signed-off-cc Automatically add email addresses that appear in + --[no-]signed-off-by-cc Automatically add email addresses that appear in Signed-off-by: or Cc: lines to the cc: list. Defaults to on. --identity The configuration identity, a subsection to prioritise over @@ -95,9 +95,9 @@ Options: 'cccmd' for the output of the cccmd, or 'all' to suppress all of these. - --suppress-from Suppress sending emails to yourself. Defaults to off. + --[no-]suppress-from Suppress sending emails to yourself. Defaults to off. - --thread Specify that the "In-Reply-To:" header should be set on all + --[no-]thread Specify that the "In-Reply-To:" header should be set on all emails. Defaults to on. --quiet Make git-send-email less verbose. One line per email From 180c9f5c299b6ec9fcd77e3346fbdd6874e028a4 Mon Sep 17 00:00:00 2001 From: Michael Witten Date: Tue, 30 Sep 2008 07:58:25 -0500 Subject: [PATCH 02/10] Docs: send-email usage text much sexier All of the descriptions are aligned, shorter, better arranged, and no line is greater than 78 columns. Signed-off-by: Michael Witten Acked-by: Jeff King Signed-off-by: Shawn O. Pearce --- git-send-email.perl | 94 +++++++++++++-------------------------------- 1 file changed, 26 insertions(+), 68 deletions(-) diff --git a/git-send-email.perl b/git-send-email.perl index 9f56162b1a..2c31a257e1 100755 --- a/git-send-email.perl +++ b/git-send-email.perl @@ -40,74 +40,32 @@ sub usage { print <... Options: - --from Specify the "From:" line of the email to be sent. - - --to Specify the primary "To:" line of the email. - - --cc Specify an initial "Cc:" list for the entire series - of emails. - - --cc-cmd Specify a command to execute per file which adds - per file specific cc address entries - - --bcc Specify a list of email addresses that should be Bcc: - on all the emails. - - --compose Use \$GIT_EDITOR, core.editor, \$EDITOR, or \$VISUAL to edit - an introductory message for the patch series. - - --subject Specify the initial "Subject:" line. - Only necessary if --compose is also set. If --compose - is not set, this will be prompted for. - - --in-reply-to Specify the first "In-Reply-To:" header line. - Only used if --compose is also set. If --compose is not - set, this will be prompted for. - - --[no-]chain-reply-to If set, the replies will all be to the previous - email sent, rather than to the first email sent. - Defaults to on. - - --[no-]signed-off-by-cc Automatically add email addresses that appear in - Signed-off-by: or Cc: lines to the cc: list. Defaults to on. - - --identity The configuration identity, a subsection to prioritise over - the default section. - - --smtp-server If set, specifies the outgoing SMTP server to use. - Defaults to localhost. Port number can be specified here with - hostname:port format or by using --smtp-server-port option. - - --smtp-server-port Specify a port on the outgoing SMTP server to connect to. - - --smtp-user The username for SMTP-AUTH. - - --smtp-pass The password for SMTP-AUTH. - - --smtp-encryption Specify 'tls' for STARTTLS encryption, or 'ssl' for SSL. - Any other value disables the feature. - - --smtp-ssl Synonym for '--smtp-encryption=ssl'. Deprecated. - - --suppress-cc Suppress the specified category of auto-CC. The category - can be one of 'author' for the patch author, 'self' to - avoid copying yourself, 'sob' for Signed-off-by lines, - 'cccmd' for the output of the cccmd, or 'all' to suppress - all of these. - - --[no-]suppress-from Suppress sending emails to yourself. Defaults to off. - - --[no-]thread Specify that the "In-Reply-To:" header should be set on all - emails. Defaults to on. - - --quiet Make git-send-email less verbose. One line per email - should be all that is output. - - --dry-run Do everything except actually send the emails. - - --envelope-sender Specify the envelope sender used to send the emails. - - --no-validate Don't perform any sanity checks on patches. + --identity * Use the sendemail. options. + --from * Email From: + --envelope-sender * Email envelope sender. + --to * Email To: + --cc * Email Cc: + --cc-cmd * Email Cc: via ` \$patch_path` + --bcc * Email Bcc: + --subject * Email "Subject:" (only if --compose). + --compose * Open an editor for introduction. + --in-reply-to * First "In-Reply-To:" (only if --compose). + --[no-]chain-reply-to * Chain In-Reply-To: fields. Default on. + --[no-]thread * Use In-Reply-To: field. Default on. + --[no-]signed-off-by-cc * Actually send to Cc: and Signed-off-by: + addresses. Default on. + --suppress-cc * author, self, sob, cccmd, all. + --[no-]suppress-from * Don't send email to self. Default off. + --smtp-server * Outgoing SMTP server to use. The port + is optional. Default 'localhost'. + --smtp-server-port * Outgoing SMTP server port. + --smtp-user * The username for SMTP-AUTH. + --smtp-pass * The password for SMTP-AUTH; not necessary. + --smtp-encryption * tls or ssl; anything else disables. + --smtp-ssl * Deprecated. Use '--smtp-encryption ssl'. + --quiet * Output one line of info per email. + --dry-run * Don't actually send the emails. + --no-validate * Don't perform sanity checks on patches. EOT exit(1); From 73811e662849c17cf9e53e63a35b676d624e032c Mon Sep 17 00:00:00 2001 From: Michael Witten Date: Tue, 30 Sep 2008 07:58:26 -0500 Subject: [PATCH 03/10] Docs: send-email: Man page option ordering Now the man page lists the options in alphabetical order (in terms of the 'main' part of an option's name). Signed-off-by: Michael Witten Acked-by: Jeff King Signed-off-by: Shawn O. Pearce --- Documentation/git-send-email.txt | 144 +++++++++++++++---------------- 1 file changed, 69 insertions(+), 75 deletions(-) diff --git a/Documentation/git-send-email.txt b/Documentation/git-send-email.txt index 9b316267dc..0c6dbf6d53 100644 --- a/Documentation/git-send-email.txt +++ b/Documentation/git-send-email.txt @@ -11,7 +11,6 @@ SYNOPSIS 'git send-email' [options] [... file|directory] - DESCRIPTION ----------- Takes the patches given on the command line and emails them out. @@ -45,19 +44,35 @@ The --cc option must be repeated for each user you want on the cc list. email sent. If disabled with "--no-chain-reply-to", all emails after the first will be sent as replies to the first email sent. When using this, it is recommended that the first file given be an overview of the - entire patch series. - Default is the value of the 'sendemail.chainreplyto' configuration - value; if that is unspecified, default to --chain-reply-to. + entire patch series. Default is the value of the 'sendemail.chainreplyto' + configuration value; if that is unspecified, default to --chain-reply-to. --compose:: Use $GIT_EDITOR, core.editor, $VISUAL, or $EDITOR to edit an introductory message for the patch series. +--dry-run:: + Do everything except actually send the emails. + +--envelope-sender:: + Specify the envelope sender used to send the emails. + This is useful if your default address is not the address that is + subscribed to a list. If you use the sendmail binary, you must have + suitable privileges for the -f parameter. Default is the value of + the 'sendemail.envelopesender' configuration variable; if that is + unspecified, choosing the envelope sender is left to your MTA. + --from:: Specify the sender of the emails. This will default to the value GIT_COMMITTER_IDENT, as returned by "git var -l". The user will still be prompted to confirm this entry. +--identity:: + A configuration identity. When given, causes values in the + 'sendemail.' subsection to take precedence over + values in the 'sendemail' section. The default identity is + the value of 'sendemail.identity'. + --in-reply-to:: Specify the contents of the first In-Reply-To header. Subsequent emails will refer to the previous email @@ -65,50 +80,19 @@ The --cc option must be repeated for each user you want on the cc list. Only necessary if --compose is also set. If --compose is not set, this will be prompted for. ---[no-]signed-off-by-cc:: - If this is set, add emails found in Signed-off-by: or Cc: lines to the - cc list. - Default is the value of 'sendemail.signedoffcc' configuration value; - if that is unspecified, default to --signed-off-by-cc. - --quiet:: Make git-send-email less verbose. One line per email should be all that is output. ---identity:: - A configuration identity. When given, causes values in the - 'sendemail.' subsection to take precedence over - values in the 'sendemail' section. The default identity is - the value of 'sendemail.identity'. +--[no-]signed-off-by-cc:: + If this is set, add emails found in Signed-off-by: or Cc: lines to the + cc list. Default is the value of 'sendemail.signedoffcc' configuration + value; if that is unspecified, default to --signed-off-by-cc. ---smtp-server:: - If set, specifies the outgoing SMTP server to use (e.g. - `smtp.example.com` or a raw IP address). Alternatively it can - specify a full pathname of a sendmail-like program instead; - the program must support the `-i` option. Default value can - be specified by the 'sendemail.smtpserver' configuration - option; the built-in default is `/usr/sbin/sendmail` or - `/usr/lib/sendmail` if such program is available, or - `localhost` otherwise. - ---smtp-server-port:: - Specifies a port different from the default port (SMTP - servers typically listen to smtp port 25 and ssmtp port - 465). - ---smtp-user:: - Username for SMTP-AUTH. In place of this option, the following - configuration variables can be specified: -+ --- - * sendemail.smtpuser - * sendemail..smtpuser (see sendemail.identity). --- -+ -However, --smtp-user always overrides these variables. -+ -If a username is not specified (with --smtp-user or a -configuration variable), then authentication is not attempted. +--smtp-encryption:: + Specify the encryption to use, either 'ssl' or 'tls'. Any other + value reverts to plain SMTP. Default is the value of + 'sendemail.smtpencryption'. --smtp-pass:: Password for SMTP-AUTH. The argument is optional: If no @@ -131,24 +115,43 @@ or on the command line. If a username has been specified (with specified (with --smtp-pass or a configuration variable), then the user is prompted for a password while the input is masked for privacy. ---smtp-encryption:: - Specify the encryption to use, either 'ssl' or 'tls'. Any other - value reverts to plain SMTP. Default is the value of - 'sendemail.smtpencryption'. +--smtp-server:: + If set, specifies the outgoing SMTP server to use (e.g. + `smtp.example.com` or a raw IP address). Alternatively it can + specify a full pathname of a sendmail-like program instead; + the program must support the `-i` option. Default value can + be specified by the 'sendemail.smtpserver' configuration + option; the built-in default is `/usr/sbin/sendmail` or + `/usr/lib/sendmail` if such program is available, or + `localhost` otherwise. + +--smtp-server-port:: + Specifies a port different from the default port (SMTP + servers typically listen to smtp port 25 and ssmtp port + 465). --smtp-ssl:: Legacy alias for '--smtp-encryption=ssl'. +--smtp-user:: + Username for SMTP-AUTH. In place of this option, the following + configuration variables can be specified: ++ +-- + * sendemail.smtpuser + * sendemail..smtpuser (see sendemail.identity). +-- ++ +However, --smtp-user always overrides these variables. ++ +If a username is not specified (with --smtp-user or a +configuration variable), then authentication is not attempted. + --subject:: Specify the initial subject of the email thread. Only necessary if --compose is also set. If --compose is not set, this will be prompted for. ---[no-]suppress-from:: - If this is set, do not add the From: address to the cc: list. - Default is the value of 'sendemail.suppressfrom' configuration value; - if that is unspecified, default to --no-suppress-from. - --suppress-cc:: Specify an additional category of recipients to suppress the auto-cc of. 'self' will avoid including the sender, 'author' will @@ -160,24 +163,24 @@ user is prompted for a password while the input is masked for privacy. if that is unspecified, default to 'self' if --suppress-from is specified, as well as 'sob' if --no-signed-off-cc is specified. +--[no-]suppress-from:: + If this is set, do not add the From: address to the cc: list. + Default is the value of 'sendemail.suppressfrom' configuration + value; if that is unspecified, default to --no-suppress-from. + --[no-]thread:: If this is set, the In-Reply-To header will be set on each email sent. If disabled with "--no-thread", no emails will have the In-Reply-To - header set. - Default is the value of the 'sendemail.thread' configuration value; - if that is unspecified, default to --thread. + header set. Default is the value of the 'sendemail.thread' configuration + value; if that is unspecified, default to --thread. ---dry-run:: - Do everything except actually send the emails. - ---envelope-sender:: - Specify the envelope sender used to send the emails. - This is useful if your default address is not the address that is - subscribed to a list. If you use the sendmail binary, you must have - suitable privileges for the -f parameter. - Default is the value of the 'sendemail.envelopesender' configuration - variable; if that is unspecified, choosing the envelope sender is left - to your MTA. +--to:: + Specify the primary recipient of the emails generated. Generally, this + will be the upstream maintainer of the project involved. Default is the + value of the 'sendemail.to' configuration value; if that is unspecified, + this will be prompted for. ++ +The --to option must be repeated for each user you want on the to list. --no-validate:: Don't perform any sanity checks on patches. @@ -188,15 +191,6 @@ user is prompted for a password while the input is masked for privacy. is due to SMTP limits as described by http://www.ietf.org/rfc/rfc2821.txt. -- ---to:: - Specify the primary recipient of the emails generated. - Generally, this will be the upstream maintainer of the - project involved. - Default is the value of the 'sendemail.to' configuration value; - if that is unspecified, this will be prompted for. -+ -The --to option must be repeated for each user you want on the to list. - CONFIGURATION ------------- From dbf5e1e974ff6264b04759a4a3e04966b056e533 Mon Sep 17 00:00:00 2001 From: Michael Witten Date: Tue, 30 Sep 2008 07:58:27 -0500 Subject: [PATCH 04/10] send-email: change --no-validate to boolean --[no-]validate There is also now a configuration variable: sendemail[.].validate Signed-off-by: Michael Witten Acked-by: Jeff King Signed-off-by: Shawn O. Pearce --- Documentation/git-send-email.txt | 9 +++++++-- git-send-email.perl | 9 +++++---- 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/Documentation/git-send-email.txt b/Documentation/git-send-email.txt index 0c6dbf6d53..81970f3fa4 100644 --- a/Documentation/git-send-email.txt +++ b/Documentation/git-send-email.txt @@ -182,14 +182,16 @@ configuration variable), then authentication is not attempted. + The --to option must be repeated for each user you want on the to list. ---no-validate:: - Don't perform any sanity checks on patches. +--[no-]validate:: + Perform sanity checks on patches. Currently, validation means the following: + -- * Warn of patches that contain lines longer than 998 characters; this is due to SMTP limits as described by http://www.ietf.org/rfc/rfc2821.txt. -- ++ +This option can be set with sendemail[.].validate; default to --validate CONFIGURATION @@ -242,6 +244,9 @@ sendemail.smtpencryption:: sendemail.smtpssl:: Legacy boolean that sets 'smtpencryption=ssl' if enabled. +sendemail.validate:: + Boolean override for --[no-]validate. + Author ------ Written by Ryan Anderson diff --git a/git-send-email.perl b/git-send-email.perl index 2c31a257e1..3467cf1cc8 100755 --- a/git-send-email.perl +++ b/git-send-email.perl @@ -65,7 +65,7 @@ Options: --smtp-ssl * Deprecated. Use '--smtp-encryption ssl'. --quiet * Output one line of info per email. --dry-run * Don't actually send the emails. - --no-validate * Don't perform sanity checks on patches. + --[no-]validate * Perform patch sanity checks. Default on. EOT exit(1); @@ -147,7 +147,7 @@ my ($quiet, $dry_run) = (0, 0); my ($thread, $chain_reply_to, $suppress_from, $signed_off_cc, $cc_cmd); my ($smtp_server, $smtp_server_port, $smtp_authuser, $smtp_encryption); my ($identity, $aliasfiletype, @alias_files, @smtp_host_parts); -my ($no_validate); +my ($validate); my (@suppress_cc); my %config_bool_settings = ( @@ -155,6 +155,7 @@ my %config_bool_settings = ( "chainreplyto" => [\$chain_reply_to, 1], "suppressfrom" => [\$suppress_from, undef], "signedoffcc" => [\$signed_off_cc, undef], + "validate" => [\$validate, 1], ); my %config_settings = ( @@ -221,7 +222,7 @@ my $rc = GetOptions("sender|from=s" => \$sender, "dry-run" => \$dry_run, "envelope-sender=s" => \$envelope_sender, "thread!" => \$thread, - "no-validate" => \$no_validate, + "validate!" => \$validate, ); unless ($rc) { @@ -374,7 +375,7 @@ for my $f (@ARGV) { } } -if (!$no_validate) { +if ($validate) { foreach my $f (@files) { unless (-p $f) { my $error = validate_patch($f); From c306e071b34b5ed0e5296574af94528953bfb607 Mon Sep 17 00:00:00 2001 From: Michael Witten Date: Tue, 30 Sep 2008 07:58:28 -0500 Subject: [PATCH 05/10] Docs: send-email: --chain_reply_to -> --[no-]chain-reply-to Signed-off-by: Michael Witten Acked-by: Jeff King Signed-off-by: Shawn O. Pearce --- Documentation/git-send-email.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Documentation/git-send-email.txt b/Documentation/git-send-email.txt index 81970f3fa4..6b620323e8 100644 --- a/Documentation/git-send-email.txt +++ b/Documentation/git-send-email.txt @@ -221,7 +221,7 @@ sendemail.bcc:: Email address (or alias) to always bcc. sendemail.chainreplyto:: - Boolean value specifying the default to the '--chain_reply_to' + Boolean value specifying the default to the '--[no-]chain-reply-to' parameter. sendemail.smtpserver:: From 3971a9733e3b17f46ab31c5fa28100533f398a3a Mon Sep 17 00:00:00 2001 From: Michael Witten Date: Tue, 30 Sep 2008 07:58:29 -0500 Subject: [PATCH 06/10] Docs: send-email: Remove unnecessary config variable description The config variables are mentioned within the descriptions of the command line options with which they are associated. Signed-off-by: Michael Witten Acked-by: Jeff King Signed-off-by: Shawn O. Pearce --- Documentation/git-send-email.txt | 91 ++++++-------------------------- 1 file changed, 16 insertions(+), 75 deletions(-) diff --git a/Documentation/git-send-email.txt b/Documentation/git-send-email.txt index 6b620323e8..0d6ac4a7b8 100644 --- a/Documentation/git-send-email.txt +++ b/Documentation/git-send-email.txt @@ -24,7 +24,8 @@ OPTIONS The options available are: --bcc:: - Specify a "Bcc:" value for each email. + Specify a "Bcc:" value for each email. Default is the value of + 'sendemail.bcc'. + The --bcc option must be repeated for each user you want on the bcc list. @@ -85,9 +86,9 @@ The --cc option must be repeated for each user you want on the cc list. all that is output. --[no-]signed-off-by-cc:: - If this is set, add emails found in Signed-off-by: or Cc: lines to the - cc list. Default is the value of 'sendemail.signedoffcc' configuration - value; if that is unspecified, default to --signed-off-by-cc. + If this is set, add emails found in Signed-off-by: or Cc: lines to the + cc list. Default is the value of 'sendemail.signedoffcc' configuration + value; if that is unspecified, default to --signed-off-by-cc. --smtp-encryption:: Specify the encryption to use, either 'ssl' or 'tls'. Any other @@ -97,22 +98,13 @@ The --cc option must be repeated for each user you want on the cc list. --smtp-pass:: Password for SMTP-AUTH. The argument is optional: If no argument is specified, then the empty string is used as - the password. -+ -In place of this option, the following configuration variables -can be specified: -+ --- - * sendemail.smtppass - * sendemail..smtppass (see sendemail.identity). --- -+ -However, --smtp-pass always overrides these variables. + the password. Default is the value of 'sendemail.smtppass', + however '--smtp-pass' always overrides this value. + Furthermore, passwords need not be specified in configuration files or on the command line. If a username has been specified (with ---smtp-user or a configuration variable), but no password has been -specified (with --smtp-pass or a configuration variable), then the +'--smtp-user' or a 'sendemail.smtpuser'), but no password has been +specified (with '--smtp-pass' or 'sendemail.smtppass'), then the user is prompted for a password while the input is masked for privacy. --smtp-server:: @@ -128,24 +120,15 @@ user is prompted for a password while the input is masked for privacy. --smtp-server-port:: Specifies a port different from the default port (SMTP servers typically listen to smtp port 25 and ssmtp port - 465). + 465). This can be set with 'sendemail.smtpserverport'. --smtp-ssl:: - Legacy alias for '--smtp-encryption=ssl'. + Legacy alias for '--smtp-encryption ssl'. --smtp-user:: - Username for SMTP-AUTH. In place of this option, the following - configuration variables can be specified: -+ --- - * sendemail.smtpuser - * sendemail..smtpuser (see sendemail.identity). --- -+ -However, --smtp-user always overrides these variables. -+ -If a username is not specified (with --smtp-user or a -configuration variable), then authentication is not attempted. + Username for SMTP-AUTH. Default is the value of 'sendemail.smtpuser'; + if a username is not specified (with '--smtp-user' or 'sendemail.smtpuser'), + then authentication is not attempted. --subject:: Specify the initial subject of the email thread. @@ -191,18 +174,12 @@ The --to option must be repeated for each user you want on the to list. is due to SMTP limits as described by http://www.ietf.org/rfc/rfc2821.txt. -- + -This option can be set with sendemail[.].validate; default to --validate +Default is the value of 'sendemail.validate'; if this is not set, +default to '--validate'. CONFIGURATION ------------- -sendemail.identity:: - The default configuration identity. When specified, - 'sendemail..' will have higher precedence than - 'sendemail.'. This is useful to declare multiple SMTP - identities and to hoist sensitive authentication information - out of the repository and into the global configuration file. - sendemail.aliasesfile:: To avoid typing long email addresses, point this to one or more email aliases files. You must also supply 'sendemail.aliasfiletype'. @@ -211,42 +188,6 @@ sendemail.aliasfiletype:: Format of the file(s) specified in sendemail.aliasesfile. Must be one of 'mutt', 'mailrc', 'pine', or 'gnus'. -sendemail.to:: - Email address (or alias) to always send to. - -sendemail.cccmd:: - Command to execute to generate per patch file specific "Cc:"s. - -sendemail.bcc:: - Email address (or alias) to always bcc. - -sendemail.chainreplyto:: - Boolean value specifying the default to the '--[no-]chain-reply-to' - parameter. - -sendemail.smtpserver:: - Default SMTP server to use. - -sendemail.smtpserverport:: - Default SMTP server port to use. - -sendemail.smtpuser:: - Default SMTP-AUTH username. - -sendemail.smtppass:: - Default SMTP-AUTH password. - -sendemail.smtpencryption:: - Default encryption method. Use 'ssl' for SSL (and specify an - appropriate port), or 'tls' for TLS. Takes precedence over - 'smtpssl' if both are specified. - -sendemail.smtpssl:: - Legacy boolean that sets 'smtpencryption=ssl' if enabled. - -sendemail.validate:: - Boolean override for --[no-]validate. - Author ------ Written by Ryan Anderson From 4ed62b0316619b70e9dc9868e93c33815ff678d5 Mon Sep 17 00:00:00 2001 From: Michael Witten Date: Tue, 30 Sep 2008 07:58:30 -0500 Subject: [PATCH 07/10] Docs: send-email: Create logical groupings for --help text The options are partitioned into more digestible groups. Signed-off-by: Michael Witten Acked-by: Jeff King Signed-off-by: Shawn O. Pearce --- git-send-email.perl | 61 +++++++++++++++++++++++++-------------------- 1 file changed, 34 insertions(+), 27 deletions(-) diff --git a/git-send-email.perl b/git-send-email.perl index 3467cf1cc8..80dae88c73 100755 --- a/git-send-email.perl +++ b/git-send-email.perl @@ -39,33 +39,40 @@ package main; sub usage { print <... -Options: - --identity * Use the sendemail. options. - --from * Email From: - --envelope-sender * Email envelope sender. - --to * Email To: - --cc * Email Cc: - --cc-cmd * Email Cc: via ` \$patch_path` - --bcc * Email Bcc: - --subject * Email "Subject:" (only if --compose). - --compose * Open an editor for introduction. - --in-reply-to * First "In-Reply-To:" (only if --compose). - --[no-]chain-reply-to * Chain In-Reply-To: fields. Default on. - --[no-]thread * Use In-Reply-To: field. Default on. - --[no-]signed-off-by-cc * Actually send to Cc: and Signed-off-by: - addresses. Default on. - --suppress-cc * author, self, sob, cccmd, all. - --[no-]suppress-from * Don't send email to self. Default off. - --smtp-server * Outgoing SMTP server to use. The port - is optional. Default 'localhost'. - --smtp-server-port * Outgoing SMTP server port. - --smtp-user * The username for SMTP-AUTH. - --smtp-pass * The password for SMTP-AUTH; not necessary. - --smtp-encryption * tls or ssl; anything else disables. - --smtp-ssl * Deprecated. Use '--smtp-encryption ssl'. - --quiet * Output one line of info per email. - --dry-run * Don't actually send the emails. - --[no-]validate * Perform patch sanity checks. Default on. + + Composing: + --from * Email From: + --to * Email To: + --cc * Email Cc: + --bcc * Email Bcc: + --subject * Email "Subject:" + --in-reply-to * Email "In-Reply-To:" + --compose * Open an editor for introduction. + + Sending: + --envelope-sender * Email envelope sender. + --smtp-server * Outgoing SMTP server to use. The port + is optional. Default 'localhost'. + --smtp-server-port * Outgoing SMTP server port. + --smtp-user * Username for SMTP-AUTH. + --smtp-pass * Password for SMTP-AUTH; not necessary. + --smtp-encryption * tls or ssl; anything else disables. + --smtp-ssl * Deprecated. Use '--smtp-encryption ssl'. + + Automating: + --identity * Use the sendemail. options. + --cc-cmd * Email Cc: via ` \$patch_path` + --suppress-cc * author, self, sob, cccmd, all. + --[no-]signed-off-by-cc * Send to Cc: and Signed-off-by: + addresses. Default on. + --[no-]suppress-from * Send to self. Default off. + --[no-]chain-reply-to * Chain In-Reply-To: fields. Default on. + --[no-]thread * Use In-Reply-To: field. Default on. + + Administering: + --quiet * Output one line of info per email. + --dry-run * Don't actually send the emails. + --[no-]validate * Perform patch sanity checks. Default on. EOT exit(1); From 917f3e73ec60820608d32016293aa496bdcbdf0e Mon Sep 17 00:00:00 2001 From: Michael Witten Date: Tue, 30 Sep 2008 07:58:31 -0500 Subject: [PATCH 08/10] Docs: send-email: Create logical groupings for man text The options are partitioned into more digestible groups. Within these groups, the options are sorted alphabetically. Signed-off-by: Michael Witten Acked-by: Jeff King Signed-off-by: Shawn O. Pearce --- Documentation/git-send-email.txt | 119 ++++++++++++++++++------------- 1 file changed, 69 insertions(+), 50 deletions(-) diff --git a/Documentation/git-send-email.txt b/Documentation/git-send-email.txt index 0d6ac4a7b8..d566c34708 100644 --- a/Documentation/git-send-email.txt +++ b/Documentation/git-send-email.txt @@ -19,9 +19,12 @@ The header of the email is configurable by command line options. If not specified on the command line, the user will be prompted with a ReadLine enabled interface to provide the necessary information. + OPTIONS ------- -The options available are: + +Composing +~~~~~~~~~ --bcc:: Specify a "Bcc:" value for each email. Default is the value of @@ -34,46 +37,15 @@ The --bcc option must be repeated for each user you want on the bcc list. + The --cc option must be repeated for each user you want on the cc list. ---cc-cmd:: - Specify a command to execute once per patch file which - should generate patch file specific "Cc:" entries. - Output of this command must be single email address per line. - Default is the value of 'sendemail.cccmd' configuration value. - ---[no-]chain-reply-to:: - If this is set, each email will be sent as a reply to the previous - email sent. If disabled with "--no-chain-reply-to", all emails after - the first will be sent as replies to the first email sent. When using - this, it is recommended that the first file given be an overview of the - entire patch series. Default is the value of the 'sendemail.chainreplyto' - configuration value; if that is unspecified, default to --chain-reply-to. - --compose:: Use $GIT_EDITOR, core.editor, $VISUAL, or $EDITOR to edit an introductory message for the patch series. ---dry-run:: - Do everything except actually send the emails. - ---envelope-sender:: - Specify the envelope sender used to send the emails. - This is useful if your default address is not the address that is - subscribed to a list. If you use the sendmail binary, you must have - suitable privileges for the -f parameter. Default is the value of - the 'sendemail.envelopesender' configuration variable; if that is - unspecified, choosing the envelope sender is left to your MTA. - --from:: Specify the sender of the emails. This will default to the value GIT_COMMITTER_IDENT, as returned by "git var -l". The user will still be prompted to confirm this entry. ---identity:: - A configuration identity. When given, causes values in the - 'sendemail.' subsection to take precedence over - values in the 'sendemail' section. The default identity is - the value of 'sendemail.identity'. - --in-reply-to:: Specify the contents of the first In-Reply-To header. Subsequent emails will refer to the previous email @@ -81,14 +53,30 @@ The --cc option must be repeated for each user you want on the cc list. Only necessary if --compose is also set. If --compose is not set, this will be prompted for. ---quiet:: - Make git-send-email less verbose. One line per email should be - all that is output. +--subject:: + Specify the initial subject of the email thread. + Only necessary if --compose is also set. If --compose + is not set, this will be prompted for. ---[no-]signed-off-by-cc:: - If this is set, add emails found in Signed-off-by: or Cc: lines to the - cc list. Default is the value of 'sendemail.signedoffcc' configuration - value; if that is unspecified, default to --signed-off-by-cc. +--to:: + Specify the primary recipient of the emails generated. Generally, this + will be the upstream maintainer of the project involved. Default is the + value of the 'sendemail.to' configuration value; if that is unspecified, + this will be prompted for. ++ +The --to option must be repeated for each user you want on the to list. + + +Sending +~~~~~~~ + +--envelope-sender:: + Specify the envelope sender used to send the emails. + This is useful if your default address is not the address that is + subscribed to a list. If you use the sendmail binary, you must have + suitable privileges for the -f parameter. Default is the value of + the 'sendemail.envelopesender' configuration variable; if that is + unspecified, choosing the envelope sender is left to your MTA. --smtp-encryption:: Specify the encryption to use, either 'ssl' or 'tls'. Any other @@ -130,10 +118,34 @@ user is prompted for a password while the input is masked for privacy. if a username is not specified (with '--smtp-user' or 'sendemail.smtpuser'), then authentication is not attempted. ---subject:: - Specify the initial subject of the email thread. - Only necessary if --compose is also set. If --compose - is not set, this will be prompted for. + +Automating +~~~~~~~~~~ + +--cc-cmd:: + Specify a command to execute once per patch file which + should generate patch file specific "Cc:" entries. + Output of this command must be single email address per line. + Default is the value of 'sendemail.cccmd' configuration value. + +--[no-]chain-reply-to:: + If this is set, each email will be sent as a reply to the previous + email sent. If disabled with "--no-chain-reply-to", all emails after + the first will be sent as replies to the first email sent. When using + this, it is recommended that the first file given be an overview of the + entire patch series. Default is the value of the 'sendemail.chainreplyto' + configuration value; if that is unspecified, default to --chain-reply-to. + +--identity:: + A configuration identity. When given, causes values in the + 'sendemail.' subsection to take precedence over + values in the 'sendemail' section. The default identity is + the value of 'sendemail.identity'. + +--[no-]signed-off-by-cc:: + If this is set, add emails found in Signed-off-by: or Cc: lines to the + cc list. Default is the value of 'sendemail.signedoffcc' configuration + value; if that is unspecified, default to --signed-off-by-cc. --suppress-cc:: Specify an additional category of recipients to suppress the @@ -157,13 +169,16 @@ user is prompted for a password while the input is masked for privacy. header set. Default is the value of the 'sendemail.thread' configuration value; if that is unspecified, default to --thread. ---to:: - Specify the primary recipient of the emails generated. Generally, this - will be the upstream maintainer of the project involved. Default is the - value of the 'sendemail.to' configuration value; if that is unspecified, - this will be prompted for. -+ -The --to option must be repeated for each user you want on the to list. + +Administering +~~~~~~~~~~~~~ + +--dry-run:: + Do everything except actually send the emails. + +--quiet:: + Make git-send-email less verbose. One line per email should be + all that is output. --[no-]validate:: Perform sanity checks on patches. @@ -180,6 +195,7 @@ default to '--validate'. CONFIGURATION ------------- + sendemail.aliasesfile:: To avoid typing long email addresses, point this to one or more email aliases files. You must also supply 'sendemail.aliasfiletype'. @@ -188,6 +204,7 @@ sendemail.aliasfiletype:: Format of the file(s) specified in sendemail.aliasesfile. Must be one of 'mutt', 'mailrc', 'pine', or 'gnus'. + Author ------ Written by Ryan Anderson @@ -195,10 +212,12 @@ Written by Ryan Anderson git-send-email is originally based upon send_lots_of_email.pl by Greg Kroah-Hartman. + Documentation -------------- Documentation by Ryan Anderson + GIT --- Part of the linkgit:git[1] suite From ddc3d4fe84d245b81afddf305b7d92ae1f0bc556 Mon Sep 17 00:00:00 2001 From: Michael Witten Date: Tue, 30 Sep 2008 07:58:32 -0500 Subject: [PATCH 09/10] send-email: signedoffcc -> signedoffbycc, but handle both The documentation now mentions sendemail.signedoffbycc instead of sendemail.signedoffcc in order to match with the options --signed-off-by-cc; the code has been updated to reflect this as well, but sendemail.signedoffcc is still handled. Signed-off-by: Michael Witten Acked-by: Jeff King Signed-off-by: Shawn O. Pearce --- Documentation/git-send-email.txt | 2 +- git-send-email.perl | 9 +++++---- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/Documentation/git-send-email.txt b/Documentation/git-send-email.txt index d566c34708..82f505686e 100644 --- a/Documentation/git-send-email.txt +++ b/Documentation/git-send-email.txt @@ -144,7 +144,7 @@ Automating --[no-]signed-off-by-cc:: If this is set, add emails found in Signed-off-by: or Cc: lines to the - cc list. Default is the value of 'sendemail.signedoffcc' configuration + cc list. Default is the value of 'sendemail.signedoffbycc' configuration value; if that is unspecified, default to --signed-off-by-cc. --suppress-cc:: diff --git a/git-send-email.perl b/git-send-email.perl index 80dae88c73..bdbfac6625 100755 --- a/git-send-email.perl +++ b/git-send-email.perl @@ -151,7 +151,7 @@ if ($@) { my ($quiet, $dry_run) = (0, 0); # Variables with corresponding config settings -my ($thread, $chain_reply_to, $suppress_from, $signed_off_cc, $cc_cmd); +my ($thread, $chain_reply_to, $suppress_from, $signed_off_by_cc, $cc_cmd); my ($smtp_server, $smtp_server_port, $smtp_authuser, $smtp_encryption); my ($identity, $aliasfiletype, @alias_files, @smtp_host_parts); my ($validate); @@ -161,7 +161,8 @@ my %config_bool_settings = ( "thread" => [\$thread, 1], "chainreplyto" => [\$chain_reply_to, 1], "suppressfrom" => [\$suppress_from, undef], - "signedoffcc" => [\$signed_off_cc, undef], + "signedoffbycc" => [\$signed_off_by_cc, undef], + "signedoffcc" => [\$signed_off_by_cc, undef], # Deprecated "validate" => [\$validate, 1], ); @@ -225,7 +226,7 @@ my $rc = GetOptions("sender|from=s" => \$sender, "cc-cmd=s" => \$cc_cmd, "suppress-from!" => \$suppress_from, "suppress-cc=s" => \@suppress_cc, - "signed-off-cc|signed-off-by-cc!" => \$signed_off_cc, + "signed-off-cc|signed-off-by-cc!" => \$signed_off_by_cc, "dry-run" => \$dry_run, "envelope-sender=s" => \$envelope_sender, "thread!" => \$thread, @@ -301,7 +302,7 @@ if ($suppress_cc{'all'}) { # If explicit old-style ones are specified, they trump --suppress-cc. $suppress_cc{'self'} = $suppress_from if defined $suppress_from; -$suppress_cc{'sob'} = !$signed_off_cc if defined $signed_off_cc; +$suppress_cc{'sob'} = !$signed_off_by_cc if defined $signed_off_by_cc; # Debugging, print out the suppressions. if (0) { From fd3a8dcbbd5972912cad44d7a5571d7606b8739e Mon Sep 17 00:00:00 2001 From: Teemu Likonen Date: Sun, 28 Sep 2008 07:51:21 +0300 Subject: [PATCH 10/10] bash completion: Add --[no-]validate to "git send-email" Signed-off-by: Teemu Likonen Signed-off-by: Shawn O. Pearce --- contrib/completion/git-completion.bash | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash index 93f088189e..7284c3b5a8 100755 --- a/contrib/completion/git-completion.bash +++ b/contrib/completion/git-completion.bash @@ -1141,7 +1141,8 @@ _git_send_email () --no-suppress-from --no-thread --quiet --signed-off-by-cc --smtp-pass --smtp-server --smtp-server-port --smtp-ssl --smtp-user --subject - --suppress-cc --suppress-from --thread --to" + --suppress-cc --suppress-from --thread --to + --validate --no-validate" return ;; esac