mirror of
https://github.com/git/git
synced 2024-11-04 16:17:49 +00:00
Merge branch 'tz/send-email-negatable-options' into maint-2.43
Newer versions of Getopt::Long started giving warnings against our (ab)use of it in "git send-email". Bump the minimum version requirement for Perl to 5.8.1 (from September 2002) to allow simplifying our implementation. * tz/send-email-negatable-options: send-email: avoid duplicate specification warnings perl: bump the required Perl version to 5.8.1 from 5.8.0
This commit is contained in:
commit
f8e2ad965a
22 changed files with 29 additions and 36 deletions
|
@ -490,7 +490,7 @@ For Perl programs:
|
||||||
|
|
||||||
- Most of the C guidelines above apply.
|
- Most of the C guidelines above apply.
|
||||||
|
|
||||||
- We try to support Perl 5.8 and later ("use Perl 5.008").
|
- We try to support Perl 5.8.1 and later ("use Perl 5.008001").
|
||||||
|
|
||||||
- use strict and use warnings are strongly preferred.
|
- use strict and use warnings are strongly preferred.
|
||||||
|
|
||||||
|
|
2
INSTALL
2
INSTALL
|
@ -119,7 +119,7 @@ Issues of note:
|
||||||
- A POSIX-compliant shell is required to run some scripts needed
|
- A POSIX-compliant shell is required to run some scripts needed
|
||||||
for everyday use (e.g. "bisect", "request-pull").
|
for everyday use (e.g. "bisect", "request-pull").
|
||||||
|
|
||||||
- "Perl" version 5.8 or later is needed to use some of the
|
- "Perl" version 5.8.1 or later is needed to use some of the
|
||||||
features (e.g. sending patches using "git send-email",
|
features (e.g. sending patches using "git send-email",
|
||||||
interacting with svn repositories with "git svn"). If you can
|
interacting with svn repositories with "git svn"). If you can
|
||||||
live without these, use NO_PERL. Note that recent releases of
|
live without these, use NO_PERL. Note that recent releases of
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
package DiffHighlight;
|
package DiffHighlight;
|
||||||
|
|
||||||
use 5.008;
|
use 5.008001;
|
||||||
use warnings FATAL => 'all';
|
use warnings FATAL => 'all';
|
||||||
use strict;
|
use strict;
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
package Git::Mediawiki;
|
package Git::Mediawiki;
|
||||||
|
|
||||||
use 5.008;
|
use 5.008001;
|
||||||
use strict;
|
use strict;
|
||||||
use POSIX;
|
use POSIX;
|
||||||
use Git;
|
use Git;
|
||||||
|
|
|
@ -54,7 +54,7 @@ =head1 Devel Notes
|
||||||
|
|
||||||
=cut
|
=cut
|
||||||
|
|
||||||
use 5.008;
|
use 5.008001;
|
||||||
use strict;
|
use strict;
|
||||||
use warnings;
|
use warnings;
|
||||||
use Getopt::Std;
|
use Getopt::Std;
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
#!/usr/bin/perl
|
#!/usr/bin/perl
|
||||||
|
|
||||||
use 5.008;
|
use 5.008001;
|
||||||
use strict;
|
use strict;
|
||||||
use warnings;
|
use warnings;
|
||||||
use Getopt::Std;
|
use Getopt::Std;
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
# The head revision is on branch "origin" by default.
|
# The head revision is on branch "origin" by default.
|
||||||
# You can change that with the '-o' option.
|
# You can change that with the '-o' option.
|
||||||
|
|
||||||
use 5.008;
|
use 5.008001;
|
||||||
use strict;
|
use strict;
|
||||||
use warnings;
|
use warnings;
|
||||||
use Getopt::Long;
|
use Getopt::Long;
|
||||||
|
|
|
@ -15,7 +15,7 @@
|
||||||
####
|
####
|
||||||
####
|
####
|
||||||
|
|
||||||
use 5.008;
|
use 5.008001;
|
||||||
use strict;
|
use strict;
|
||||||
use warnings;
|
use warnings;
|
||||||
use bytes;
|
use bytes;
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
# and second line is the subject of the message.
|
# and second line is the subject of the message.
|
||||||
#
|
#
|
||||||
|
|
||||||
use 5.008;
|
use 5.008001;
|
||||||
use strict;
|
use strict;
|
||||||
use warnings $ENV{GIT_PERL_FATAL_WARNINGS} ? qw(FATAL all) : ();
|
use warnings $ENV{GIT_PERL_FATAL_WARNINGS} ? qw(FATAL all) : ();
|
||||||
use Getopt::Long;
|
use Getopt::Long;
|
||||||
|
@ -119,13 +119,16 @@ sub completion_helper {
|
||||||
|
|
||||||
foreach my $key (keys %$original_opts) {
|
foreach my $key (keys %$original_opts) {
|
||||||
unless (exists $not_for_completion{$key}) {
|
unless (exists $not_for_completion{$key}) {
|
||||||
$key =~ s/!$//;
|
my $negatable = ($key =~ s/!$//);
|
||||||
|
|
||||||
if ($key =~ /[:=][si]$/) {
|
if ($key =~ /[:=][si]$/) {
|
||||||
$key =~ s/[:=][si]$//;
|
$key =~ s/[:=][si]$//;
|
||||||
push (@send_email_opts, "--$_=") foreach (split (/\|/, $key));
|
push (@send_email_opts, "--$_=") foreach (split (/\|/, $key));
|
||||||
} else {
|
} else {
|
||||||
push (@send_email_opts, "--$_") foreach (split (/\|/, $key));
|
push (@send_email_opts, "--$_") foreach (split (/\|/, $key));
|
||||||
|
if ($negatable) {
|
||||||
|
push (@send_email_opts, "--no-$_") foreach (split (/\|/, $key));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -228,7 +231,7 @@ sub system_or_msg {
|
||||||
my @sprintf_args = ($cmd_name ? $cmd_name : $args->[0], $exit_code);
|
my @sprintf_args = ($cmd_name ? $cmd_name : $args->[0], $exit_code);
|
||||||
if (defined $msg) {
|
if (defined $msg) {
|
||||||
# Quiet the 'redundant' warning category, except we
|
# Quiet the 'redundant' warning category, except we
|
||||||
# need to support down to Perl 5.8, so we can't do a
|
# need to support down to Perl 5.8.1, so we can't do a
|
||||||
# "no warnings 'redundant'", since that category was
|
# "no warnings 'redundant'", since that category was
|
||||||
# introduced in perl 5.22, and asking for it will die
|
# introduced in perl 5.22, and asking for it will die
|
||||||
# on older perls.
|
# on older perls.
|
||||||
|
@ -491,7 +494,6 @@ sub config_regexp {
|
||||||
"bcc=s" => \@getopt_bcc,
|
"bcc=s" => \@getopt_bcc,
|
||||||
"no-bcc" => \$no_bcc,
|
"no-bcc" => \$no_bcc,
|
||||||
"chain-reply-to!" => \$chain_reply_to,
|
"chain-reply-to!" => \$chain_reply_to,
|
||||||
"no-chain-reply-to" => sub {$chain_reply_to = 0},
|
|
||||||
"sendmail-cmd=s" => \$sendmail_cmd,
|
"sendmail-cmd=s" => \$sendmail_cmd,
|
||||||
"smtp-server=s" => \$smtp_server,
|
"smtp-server=s" => \$smtp_server,
|
||||||
"smtp-server-option=s" => \@smtp_server_options,
|
"smtp-server-option=s" => \@smtp_server_options,
|
||||||
|
@ -506,36 +508,27 @@ sub config_regexp {
|
||||||
"smtp-auth=s" => \$smtp_auth,
|
"smtp-auth=s" => \$smtp_auth,
|
||||||
"no-smtp-auth" => sub {$smtp_auth = 'none'},
|
"no-smtp-auth" => sub {$smtp_auth = 'none'},
|
||||||
"annotate!" => \$annotate,
|
"annotate!" => \$annotate,
|
||||||
"no-annotate" => sub {$annotate = 0},
|
|
||||||
"compose" => \$compose,
|
"compose" => \$compose,
|
||||||
"quiet" => \$quiet,
|
"quiet" => \$quiet,
|
||||||
"cc-cmd=s" => \$cc_cmd,
|
"cc-cmd=s" => \$cc_cmd,
|
||||||
"header-cmd=s" => \$header_cmd,
|
"header-cmd=s" => \$header_cmd,
|
||||||
"no-header-cmd" => \$no_header_cmd,
|
"no-header-cmd" => \$no_header_cmd,
|
||||||
"suppress-from!" => \$suppress_from,
|
"suppress-from!" => \$suppress_from,
|
||||||
"no-suppress-from" => sub {$suppress_from = 0},
|
|
||||||
"suppress-cc=s" => \@suppress_cc,
|
"suppress-cc=s" => \@suppress_cc,
|
||||||
"signed-off-cc|signed-off-by-cc!" => \$signed_off_by_cc,
|
"signed-off-cc|signed-off-by-cc!" => \$signed_off_by_cc,
|
||||||
"no-signed-off-cc|no-signed-off-by-cc" => sub {$signed_off_by_cc = 0},
|
"cc-cover!" => \$cover_cc,
|
||||||
"cc-cover|cc-cover!" => \$cover_cc,
|
"to-cover!" => \$cover_to,
|
||||||
"no-cc-cover" => sub {$cover_cc = 0},
|
|
||||||
"to-cover|to-cover!" => \$cover_to,
|
|
||||||
"no-to-cover" => sub {$cover_to = 0},
|
|
||||||
"confirm=s" => \$confirm,
|
"confirm=s" => \$confirm,
|
||||||
"dry-run" => \$dry_run,
|
"dry-run" => \$dry_run,
|
||||||
"envelope-sender=s" => \$envelope_sender,
|
"envelope-sender=s" => \$envelope_sender,
|
||||||
"thread!" => \$thread,
|
"thread!" => \$thread,
|
||||||
"no-thread" => sub {$thread = 0},
|
|
||||||
"validate!" => \$validate,
|
"validate!" => \$validate,
|
||||||
"no-validate" => sub {$validate = 0},
|
|
||||||
"transfer-encoding=s" => \$target_xfer_encoding,
|
"transfer-encoding=s" => \$target_xfer_encoding,
|
||||||
"format-patch!" => \$format_patch,
|
"format-patch!" => \$format_patch,
|
||||||
"no-format-patch" => sub {$format_patch = 0},
|
|
||||||
"8bit-encoding=s" => \$auto_8bit_encoding,
|
"8bit-encoding=s" => \$auto_8bit_encoding,
|
||||||
"compose-encoding=s" => \$compose_encoding,
|
"compose-encoding=s" => \$compose_encoding,
|
||||||
"force" => \$force,
|
"force" => \$force,
|
||||||
"xmailer!" => \$use_xmailer,
|
"xmailer!" => \$use_xmailer,
|
||||||
"no-xmailer" => sub {$use_xmailer = 0},
|
|
||||||
"batch-size=i" => \$batch_size,
|
"batch-size=i" => \$batch_size,
|
||||||
"relogin-delay=i" => \$relogin_delay,
|
"relogin-delay=i" => \$relogin_delay,
|
||||||
"git-completion-helper" => \$git_completion_helper,
|
"git-completion-helper" => \$git_completion_helper,
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
#!/usr/bin/perl
|
#!/usr/bin/perl
|
||||||
# Copyright (C) 2006, Eric Wong <normalperson@yhbt.net>
|
# Copyright (C) 2006, Eric Wong <normalperson@yhbt.net>
|
||||||
# License: GPL v2 or later
|
# License: GPL v2 or later
|
||||||
use 5.008;
|
use 5.008001;
|
||||||
use warnings $ENV{GIT_PERL_FATAL_WARNINGS} ? qw(FATAL all) : ();
|
use warnings $ENV{GIT_PERL_FATAL_WARNINGS} ? qw(FATAL all) : ();
|
||||||
use strict;
|
use strict;
|
||||||
use vars qw/ $AUTHOR $VERSION
|
use vars qw/ $AUTHOR $VERSION
|
||||||
|
|
|
@ -29,7 +29,7 @@ Requirements
|
||||||
------------
|
------------
|
||||||
|
|
||||||
- Core git tools
|
- Core git tools
|
||||||
- Perl 5.8
|
- Perl 5.8.1
|
||||||
- Perl modules: CGI, Encode, Fcntl, File::Find, File::Basename.
|
- Perl modules: CGI, Encode, Fcntl, File::Find, File::Basename.
|
||||||
- web server
|
- web server
|
||||||
|
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
#
|
#
|
||||||
# This program is licensed under the GPLv2
|
# This program is licensed under the GPLv2
|
||||||
|
|
||||||
use 5.008;
|
use 5.008001;
|
||||||
use strict;
|
use strict;
|
||||||
use warnings;
|
use warnings;
|
||||||
# handle ACL in file access tests
|
# handle ACL in file access tests
|
||||||
|
|
|
@ -7,7 +7,7 @@ =head1 NAME
|
||||||
|
|
||||||
package Git;
|
package Git;
|
||||||
|
|
||||||
use 5.008;
|
use 5.008001;
|
||||||
use strict;
|
use strict;
|
||||||
use warnings $ENV{GIT_PERL_FATAL_WARNINGS} ? qw(FATAL all) : ();
|
use warnings $ENV{GIT_PERL_FATAL_WARNINGS} ? qw(FATAL all) : ();
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
package Git::I18N;
|
package Git::I18N;
|
||||||
use 5.008;
|
use 5.008001;
|
||||||
use strict;
|
use strict;
|
||||||
use warnings $ENV{GIT_PERL_FATAL_WARNINGS} ? qw(FATAL all) : ();
|
use warnings $ENV{GIT_PERL_FATAL_WARNINGS} ? qw(FATAL all) : ();
|
||||||
BEGIN {
|
BEGIN {
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
package Git::LoadCPAN;
|
package Git::LoadCPAN;
|
||||||
use 5.008;
|
use 5.008001;
|
||||||
use strict;
|
use strict;
|
||||||
use warnings $ENV{GIT_PERL_FATAL_WARNINGS} ? qw(FATAL all) : ();
|
use warnings $ENV{GIT_PERL_FATAL_WARNINGS} ? qw(FATAL all) : ();
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
package Git::LoadCPAN::Error;
|
package Git::LoadCPAN::Error;
|
||||||
use 5.008;
|
use 5.008001;
|
||||||
use strict;
|
use strict;
|
||||||
use warnings $ENV{GIT_PERL_FATAL_WARNINGS} ? qw(FATAL all) : ();
|
use warnings $ENV{GIT_PERL_FATAL_WARNINGS} ? qw(FATAL all) : ();
|
||||||
use Git::LoadCPAN (
|
use Git::LoadCPAN (
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
package Git::LoadCPAN::Mail::Address;
|
package Git::LoadCPAN::Mail::Address;
|
||||||
use 5.008;
|
use 5.008001;
|
||||||
use strict;
|
use strict;
|
||||||
use warnings $ENV{GIT_PERL_FATAL_WARNINGS} ? qw(FATAL all) : ();
|
use warnings $ENV{GIT_PERL_FATAL_WARNINGS} ? qw(FATAL all) : ();
|
||||||
use Git::LoadCPAN (
|
use Git::LoadCPAN (
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
package Git::Packet;
|
package Git::Packet;
|
||||||
use 5.008;
|
use 5.008001;
|
||||||
use strict;
|
use strict;
|
||||||
use warnings $ENV{GIT_PERL_FATAL_WARNINGS} ? qw(FATAL all) : ();
|
use warnings $ENV{GIT_PERL_FATAL_WARNINGS} ? qw(FATAL all) : ();
|
||||||
BEGIN {
|
BEGIN {
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
#!/usr/bin/perl
|
#!/usr/bin/perl
|
||||||
use 5.008;
|
use 5.008001;
|
||||||
use lib (split(/:/, $ENV{GITPERLLIB}));
|
use lib (split(/:/, $ENV{GITPERLLIB}));
|
||||||
use strict;
|
use strict;
|
||||||
use warnings;
|
use warnings;
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
use 5.008;
|
use 5.008001;
|
||||||
use strict;
|
use strict;
|
||||||
use warnings;
|
use warnings;
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
#!/usr/bin/perl
|
#!/usr/bin/perl
|
||||||
use lib (split(/:/, $ENV{GITPERLLIB}));
|
use lib (split(/:/, $ENV{GITPERLLIB}));
|
||||||
|
|
||||||
use 5.008;
|
use 5.008001;
|
||||||
use warnings;
|
use warnings;
|
||||||
use strict;
|
use strict;
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
#!/usr/bin/perl
|
#!/usr/bin/perl
|
||||||
use 5.008;
|
use 5.008001;
|
||||||
use strict;
|
use strict;
|
||||||
use warnings;
|
use warnings;
|
||||||
use IO::Pty;
|
use IO::Pty;
|
||||||
|
|
Loading…
Reference in a new issue