Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Witten <mfwitten@MIT.EDU>2008-09-30 16:58:27 +0400
committerShawn O. Pearce <spearce@spearce.org>2008-10-01 19:56:58 +0400
commitdbf5e1e974ff6264b04759a4a3e04966b056e533 (patch)
tree23f14cb857e3a43a839316700985d63aa0de8ad4 /git-send-email.perl
parent73811e662849c17cf9e53e63a35b676d624e032c (diff)
send-email: change --no-validate to boolean --[no-]validate
There is also now a configuration variable: sendemail[.<identity>].validate Signed-off-by: Michael Witten <mfwitten@mit.edu> Acked-by: Jeff King <peff@peff.net> Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Diffstat (limited to 'git-send-email.perl')
-rwxr-xr-xgit-send-email.perl9
1 files changed, 5 insertions, 4 deletions
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);