From: Junio C Hamano <gitster@pobox•com>
To: Git mailing list <git@vger•kernel.org>
Cc: "brian m. carlson" <sandals@crustytoothpaste•net>,
"Kyle J. McKay" <mackyle@gmail•com>,
"Tom G. Christensen" <tgc@statsbiblioteket•dk>
Subject: Re: [PATCH] t9001: use older Getopt::Long boolean prefix '--no' rather than '--no-'
Date: Thu, 12 Feb 2015 15:12:08 -0800 [thread overview]
Message-ID: <xmqq8ug2pvw7.fsf@gitster.dls.corp.google.com> (raw)
In-Reply-To: <a924a58108ea8ad8aece1ee66cbdc3f@74d39fa044aa309eaea14b9f57fe79c> (Kyle J. McKay's message of "Fri, 30 Jan 2015 18:40:17 -0800")
"Kyle J. McKay" <mackyle@gmail•com> writes:
> Since it's really not very difficult or invasive to add support for
> the no- variants, here's a patch to do so:
I am inclined to replace the tc/t9001-noxmailer topic that has been
sitting on my Undecided pile with this patch and move it forward.
* tc/t9001-noxmailer (2015-01-30) 1 commit
- t9001: use older Getopt::Long boolean prefix '--no' rather than '--no-'
Please stop me if I am missing something obviously wrong with this
plan.
Thanks.
> -- 8< --
> Subject: [PATCH] git-send-email.perl: support no- prefix with older GetOptions
>
> Only Perl version 5.8.0 or later is required, but that comes with
> an older Getopt::Long (2.32) that does not support the 'no-'
> prefix. Support for that was added in Getopt::Long version 2.33.
>
> Since the help only mentions the 'no-' prefix and not the 'no'
> prefix, add explicit support for the 'no-' prefix when running
> with older GetOptions versions.
>
> Reported-by: Tom G. Christensen <tgc@statsbiblioteket•dk>
> Signed-off-by: Kyle J. McKay <mackyle@gmail•com>
> ---
> git-send-email.perl | 10 ++++++++++
> 1 file changed, 10 insertions(+)
>
> diff --git a/git-send-email.perl b/git-send-email.perl
> index 3092ab35..a18a7959 100755
> --- a/git-send-email.perl
> +++ b/git-send-email.perl
> @@ -299,6 +299,7 @@ my $rc = GetOptions("h" => \$help,
> "bcc=s" => \@bcclist,
> "no-bcc" => \$no_bcc,
> "chain-reply-to!" => \$chain_reply_to,
> + "no-chain-reply-to" => sub {$chain_reply_to = 0},
> "smtp-server=s" => \$smtp_server,
> "smtp-server-option=s" => \@smtp_server_options,
> "smtp-server-port=s" => \$smtp_server_port,
> @@ -311,25 +312,34 @@ my $rc = GetOptions("h" => \$help,
> "smtp-domain:s" => \$smtp_domain,
> "identity=s" => \$identity,
> "annotate!" => \$annotate,
> + "no-annotate" => sub {$annotate = 0},
> "compose" => \$compose,
> "quiet" => \$quiet,
> "cc-cmd=s" => \$cc_cmd,
> "suppress-from!" => \$suppress_from,
> + "no-suppress-from" => sub {$suppress_from = 0},
> "suppress-cc=s" => \@suppress_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|cc-cover!" => \$cover_cc,
> + "no-cc-cover" => sub {$cover_cc = 0},
> "to-cover|to-cover!" => \$cover_to,
> + "no-to-cover" => sub {$cover_to = 0},
> "confirm=s" => \$confirm,
> "dry-run" => \$dry_run,
> "envelope-sender=s" => \$envelope_sender,
> "thread!" => \$thread,
> + "no-thread" => sub {$thread = 0},
> "validate!" => \$validate,
> + "no-validate" => sub {$validate = 0},
> "transfer-encoding=s" => \$target_xfer_encoding,
> "format-patch!" => \$format_patch,
> + "no-format-patch" => sub {$format_patch = 0},
> "8bit-encoding=s" => \$auto_8bit_encoding,
> "compose-encoding=s" => \$compose_encoding,
> "force" => \$force,
> "xmailer!" => \$use_xmailer,
> + "no-xmailer" => sub {$use_xmailer = 0},
> );
>
> usage() if $help;
> --
next prev parent reply other threads:[~2015-02-12 23:12 UTC|newest]
Thread overview: 35+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-01-27 23:35 [ANNOUNCE] Git v2.3.0-rc2 Junio C Hamano
2015-01-29 12:58 ` Broken makefile check for curl version on el4 [Re: [ANNOUNCE] Git v2.3.0-rc2] Tom G. Christensen
2015-01-30 9:52 ` [PATCH] Makefile: Handle broken curl version number in version check Tom G. Christensen
2015-01-30 14:50 ` Andreas Schwab
2015-01-30 15:34 ` Tom G. Christensen
2015-01-30 15:41 ` Kyle J. McKay
2015-01-30 22:09 ` Junio C Hamano
2015-01-29 13:11 ` All gnupg tests broken on el4 [Re: [ANNOUNCE] Git v2.3.0-rc2] Tom G. Christensen
2015-01-29 15:43 ` Jeff King
2015-01-29 15:51 ` Jeff King
2015-01-29 17:34 ` Tom G. Christensen
2015-01-29 18:48 ` Junio C Hamano
2015-01-29 13:30 ` Testsuite regression with perl 5.8.0 " Tom G. Christensen
2015-01-29 15:52 ` Jeff King
2015-01-30 9:53 ` Tom G. Christensen
2015-01-30 6:24 ` [PATCH] t9001: use older Getopt::Long boolean prefix '--no' rather than '--no-' Tom G. Christensen
2015-01-30 23:05 ` brian m. carlson
2015-01-31 2:40 ` Kyle J. McKay
2015-02-02 1:33 ` Junio C Hamano
2015-02-02 16:11 ` Kyle J. McKay
2015-02-02 20:12 ` Junio C Hamano
2015-02-12 23:12 ` Junio C Hamano [this message]
2015-02-13 20:19 ` [PATCH 0/2] Getopt::Long workaround in send-email Junio C Hamano
2015-02-13 20:19 ` [PATCH 1/2] git-send-email.perl: support no- prefix with older GetOptions Junio C Hamano
2015-02-15 6:32 ` Brandon Casey
[not found] ` <031750B1-259D-4F19-8484-98A7A1266248@gmail.com>
2015-02-16 1:35 ` Brandon Casey
2015-02-13 20:19 ` [PATCH 2/2] SQUASH??? t9001: turn --no$option workarounds to --no-$option Junio C Hamano
2015-02-13 20:30 ` [PATCH 0/2] Getopt::Long workaround in send-email Kyle J. McKay
2015-02-13 22:21 ` brian m. carlson
2015-02-15 6:13 ` Brandon Casey
2015-02-16 9:58 ` Tom G. Christensen
-- strict thread matches above, loose matches on Subject: below --
2009-04-24 23:18 [PATCH] t9001: use older Getopt::Long boolean prefix '--no' rather than '--no-' Brandon Casey
2008-10-11 0:21 Brandon Casey
2008-10-11 0:24 ` Shawn O. Pearce
2008-10-11 0:44 ` Brandon Casey
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=xmqq8ug2pvw7.fsf@gitster.dls.corp.google.com \
--to=gitster@pobox$(echo .)com \
--cc=git@vger$(echo .)kernel.org \
--cc=mackyle@gmail$(echo .)com \
--cc=sandals@crustytoothpaste$(echo .)net \
--cc=tgc@statsbiblioteket$(echo .)dk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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