git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Michael Witten <mfwitten@MIT.EDU>
To: gitster@pobox.com
Cc: git@vger.kernel.org
Subject: [PATCH RFC 5/6] Docs: send-email: change --no-validate to boolean --[no-]validate
Date: Thu, 25 Sep 2008 15:44:35 -0500	[thread overview]
Message-ID: <1222375476-32911-5-git-send-email-mfwitten@mit.edu> (raw)
In-Reply-To: <1222375476-32911-4-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              |   10 ++++++----
 2 files changed, 13 insertions(+), 6 deletions(-)

diff --git a/Documentation/git-send-email.txt b/Documentation/git-send-email.txt
index 6031eb7..fe53e9b 100644
--- a/Documentation/git-send-email.txt
+++ b/Documentation/git-send-email.txt
@@ -189,14 +189,16 @@ 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.
+--[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
@@ -249,6 +251,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 b86a3f3..8bc204f 100755
--- a/git-send-email.perl
+++ b/git-send-email.perl
@@ -113,7 +113,8 @@ Options:
    --envelope-sender       Specify the envelope sender used to send the
                            emails.
 
-   --no-validate           Don't perform any sanity checks on patches.
+   --[no-]validate         Perform any sanity checks on patches.
+                           Default to on.
 
 EOT
 	exit(1);
@@ -195,7 +196,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 = (
@@ -203,6 +204,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 = (
@@ -269,7 +271,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) {
@@ -422,7 +424,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.302.ge6cbd1

  reply	other threads:[~2008-09-25 20:46 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-09-22 15:58 [PATCH RFC 1/6] Docs: send-email's usage text and man page mention same options Michael Witten
2008-09-22 15:58 ` [PATCH RFC 2/6] Docs: send-email usage cleanup 1 Michael Witten
2008-09-22 15:58   ` [PATCH RFC 3/6] Docs: send-email usage text much sexier Michael Witten
2008-09-22 15:58     ` [PATCH RFC 4/6] Docs: send-email: Option order the same in man page and usage text Michael Witten
2008-09-22 15:58       ` [PATCH RFC 5/6] Docs: send-email: change --no-validate to boolean --[no-]validate Michael Witten
2008-09-22 15:58         ` [PATCH RFC 6/6] Docs: send-email: --chain_reply_to -> --[no-]chain-reply-to Michael Witten
2008-09-25 20:44 ` [PATCH RFC 1/6] Docs: send-email's usage text and man page mention same options Michael Witten
2008-09-25 20:44   ` [PATCH RFC 2/6] Docs: send-email usage cleanup 1 Michael Witten
2008-09-25 20:44     ` [PATCH RFC 3/6] Docs: send-email usage text much sexier Michael Witten
2008-09-25 20:44       ` [PATCH RFC 4/6] Docs: send-email: Option order the same in man page and usage text Michael Witten
2008-09-25 20:44         ` Michael Witten [this message]
2008-09-25 20:44           ` [PATCH RFC 6/6] Docs: send-email: --chain_reply_to -> --[no-]chain-reply-to Michael Witten
2008-09-26 22:40         ` [PATCH RFC 4/6] Docs: send-email: Option order the same in man page and usage text Jeff King
2008-09-27  1:13           ` 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

  List information: http://vger.kernel.org/majordomo-info.html

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

  git send-email \
    --in-reply-to=1222375476-32911-5-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.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).