git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Michael Witten <mfwitten@MIT.EDU>
To: gitster@pobox.com
Cc: git@vger.kernel.org
Subject: [PATCH 4/8] send-email: change --no-validate to boolean --[no-]validate
Date: Sat, 27 Sep 2008 20:09:52 -0500	[thread overview]
Message-ID: <1222564196-84202-4-git-send-email-mfwitten@mit.edu> (raw)
In-Reply-To: <1222564196-84202-3-git-send-email-mfwitten@mit.edu>

There is also now a configuration variable:

    sendemail[.<identity>].validate

Signed-off-by: Michael Witten <mfwitten@mit.edu>
---
 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 0c6dbf6..81970f3 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[.<identity>].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 <ryan@michonline.com>
diff --git a/git-send-email.perl b/git-send-email.perl
index 2c31a25..3467cf1 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);
-- 
1.6.0.2.304.g577ee

  reply	other threads:[~2008-09-28  1:12 UTC|newest]

Thread overview: 45+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-09-28  1:09 [PATCH 1/8] Docs: send-email's usage text and man page mention same options Michael Witten
2008-09-28  1:09 ` [PATCH 2/8] Docs: send-email usage text much sexier Michael Witten
2008-09-28  1:09   ` [PATCH 3/8] Docs: send-email: Man page option ordering Michael Witten
2008-09-28  1:09     ` Michael Witten [this message]
2008-09-28  1:09       ` [PATCH 5/8] Docs: send-email: --chain_reply_to -> --[no-]chain-reply-to Michael Witten
2008-09-28  1:09         ` [PATCH 6/8] Docs: Arranged config options in man page Michael Witten
2008-09-28  1:09           ` [PATCH 7/8] Docs: send-email: Added all config variables to man end Michael Witten
2008-09-28  1:09             ` [PATCH 8/8] Docs: config: send-email config options included Michael Witten
2008-09-28  3:24               ` Jeff King
2008-09-28 19:03                 ` Michael Witten
2008-09-28 19:06                   ` Jeff King
2008-09-28  3:18             ` [PATCH 7/8] Docs: send-email: Added all config variables to man end Jeff King
2008-09-28 19:03               ` Michael Witten
2008-09-28 19:08                 ` Jeff King
2008-09-28  3:15           ` [PATCH 6/8] Docs: Arranged config options in man page Jeff King
2008-09-28 19:03             ` Michael Witten
2008-09-28  4:51       ` [PATCH] bash completion: Add --[no-]-validate to "git send-email" Teemu Likonen
2008-09-28 12:55         ` Teemu Likonen
2008-09-28  8:08     ` [PATCH 3/8] Docs: send-email: Man page option ordering Jakub Narebski
2008-09-28 19:04       ` Michael Witten
2008-09-29  0:10         ` Jakub Narebski
2008-09-29  0:36           ` Jeff King
2008-09-29  5:08             ` [RFC 6/9] Docs: send-email: Remove unnecessary config variable description Michael Witten
2008-09-29  5:08               ` [RFC 7/9] send-email: Completely replace --signed-off-cc with --signed-off-by-cc Michael Witten
2008-09-29  5:08                 ` [RFC 8/9] Docs: send-email: Create logical groupings for --help text Michael Witten
2008-09-29  5:08                   ` [RFC 9/9] Docs: send-email: Create logical groupings for man text Michael Witten
2008-09-29 16:25                   ` [RFC 8/9] Docs: send-email: Create logical groupings for --help text Jeff King
     [not found]             ` <1222664781-55763-1-git-send-email-mfwitten@mit.edu>
     [not found]               ` <1222664781-55763-2-git-send-email-mfwitten@mit.edu>
2008-09-29 16:29                 ` [RFC 7/9] send-email: Completely replace --signed-off-cc with --signed-off-by-cc Jeff King
2008-09-29 17:41                   ` [RFC2 8/9] Docs: send-email: Create logical groupings for man text Michael Witten
2008-09-29 17:41                     ` [RFC2 9/9] send-email: signedoffcc -> signedoffbycc, but handle both Michael Witten
2008-09-29 17:44                       ` Jeff King
2008-09-30 12:58                         ` [PATCH 1/9] Docs: send-email's usage text and man page mention same options Michael Witten
2008-09-30 12:58                           ` [PATCH 2/9] Docs: send-email usage text much sexier Michael Witten
2008-09-30 12:58                             ` [PATCH 3/9] Docs: send-email: Man page option ordering Michael Witten
2008-09-30 12:58                               ` [PATCH 4/9] send-email: change --no-validate to boolean --[no-]validate Michael Witten
2008-09-30 12:58                                 ` [PATCH 5/9] Docs: send-email: --chain_reply_to -> --[no-]chain-reply-to Michael Witten
2008-09-30 12:58                                   ` [PATCH 6/9] Docs: send-email: Remove unnecessary config variable description Michael Witten
2008-09-30 12:58                                     ` [PATCH 7/9] Docs: send-email: Create logical groupings for --help text Michael Witten
2008-09-30 12:58                                       ` [PATCH 8/9] Docs: send-email: Create logical groupings for man text Michael Witten
2008-09-30 12:58                                         ` [PATCH 9/9] send-email: signedoffcc -> signedoffbycc, but handle both Michael Witten
2008-10-01  3:27                               ` [PATCH 3/9] Docs: send-email: Man page option ordering Jeff King
2008-10-01 20:34                                 ` Michael Witten
2008-10-01 20:36                                   ` Shawn O. Pearce
2008-09-28  5:08 ` [PATCH 1/8] Docs: send-email's usage text and man page mention same options Miklos Vajna
2008-09-28 19:04   ` Michael Witten

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1222564196-84202-4-git-send-email-mfwitten@mit.edu \
    --to=mfwitten@mit.edu \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).