From patchwork Fri Nov 24 09:39:32 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "H.Merijn Brand" X-Patchwork-Id: 13467385 Authentication-Results: smtp.subspace.kernel.org; dkim=none X-Greylist: delayed 521 seconds by postgrey-1.37 at lindbergh.monkeyblade.net; Fri, 24 Nov 2023 01:48:25 PST Received: from outbound.soverin.net (outbound.soverin.net [IPv6:2a10:de80:1:4091:b9e9:2212:0:1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E58E710E7 for ; Fri, 24 Nov 2023 01:48:25 -0800 (PST) Received: from smtp.freedom.nl (c04cst-smtp-frd02.int.sover.in [10.10.4.108]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by outbound.soverin.net (Postfix) with ESMTPS id 4Sc91S0zbvz1Fq for ; Fri, 24 Nov 2023 09:39:40 +0000 (UTC) Received: from smtp.freedom.nl (smtp.freedom.nl [10.10.4.108]) by freedom.nl (Postfix) with ESMTPSA id 4Sc91R4cwnz2xCF for ; Fri, 24 Nov 2023 09:39:39 +0000 (UTC) ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freedom.nl; s=default; t=1700818779; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type:content-transfer-encoding:in-reply-to: references; bh=tPOIXTEJVuVCNcJ7ddV+C1RhlLEulSBvjGy5Hby/YiI=; b=EzDwBOdveKl7ax7jhP7jkcWSxhhj2lfshTupJnuyeZ82NElFIusGIVycQ0PooutJjMpIdr BN+8rKj4bqW913Cd+izjDiSAVSRPvbyv+cLIPfQXjEqqnryfQ+iPlMuJShR2t7htCctznv 5dUj0HRJVzFyBzRPF7tekFBha9F5a7k= ARC-Authentication-Results: i=1; smtp.freedom.nl; auth=pass smtp.mailfrom=linux@tux.freedom.nl ARC-Seal: i=1; s=default; d=freedom.nl; t=1700818779; a=rsa-sha256; cv=none; b=OCZyxS+N9tKUPnoAzhGBOPvIBUyFeqiRc16FlYxjx5sGoDGd7yswwPbGOS5ujES285DF10 yq5K8pHALFTcAk25I+F3k8BlE3iuW7gfSkDo8fkv2AAlPSHUvsmn/xqUUGcq9yA9RZwPCZ Uu7u7cHIffUwt+hFJrk2qXU+RwrMRCA= Date: Fri, 24 Nov 2023 10:39:32 +0100 X-Soverin-Authenticated: true From: "H.Merijn Brand" To: git@vger.kernel.org Subject: Fix git-send-email.perl w.r.t. recent Getopt::Long update Message-ID: <20231124103932.31ca7688@pc09> Precedence: bulk X-Mailing-List: git@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Patch attached From the Getopt::Long changes: ``` Changes in version 2.55 ----------------------- * Fix long standing bug that duplicate options were not detected when the options differ in case while ignore_case is in effect. This will now yield a warning and become a fatal error in a future release. ``` Current version is 2.57 ``` git-2.43.0 From 206ace60f7045e309e506a1b9de775f4e9a43b46 Mon Sep 17 00:00:00 2001 From: "H.Merijn Brand - Tux" Date: Fri, 24 Nov 2023 10:27:35 +0100 Subject: [PATCH] perl Getopt::Long now issues warnings for duplicate options $ perl -Iperl git-send-email.perl.org --help Duplicate specification "no-validate" for option "no-validate" Duplicate specification "to-cover|to-cover!" for option "to-cover" Duplicate specification "no-signed-off-cc|no-signed-off-by-cc" for option "no-signed-off-cc" Duplicate specification "no-signed-off-cc|no-signed-off-by-cc" for option "no-signed-off-by-cc" Duplicate specification "no-format-patch" for option "no-format-patch" Duplicate specification "cc-cover|cc-cover!" for option "cc-cover" Duplicate specification "no-annotate" for option "no-annotate" Duplicate specification "no-chain-reply-to" for option "no-chain-reply-to" Duplicate specification "no-cc-cover" for option "no-cc-cover" "option!" => \$value *automatically* supports both --option and --no-option and --nooption The argument specification can be ! The option does not take an argument and may be negated by prefixing it with "no" or "no-". E.g. "foo!" will allow "--foo" (a value of 1 will be assigned) as well as "--nofoo" and "--no-foo" (a value of 0 will be assigned). If the option has aliases, this applies to the aliases as well. Using negation on a single letter option when bundling is in effect is pointless and will result in a warning. Signed-off-by: H.Merijn Brand - Tux --- git-send-email.perl | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/git-send-email.perl b/git-send-email.perl index d24e981d61..125f49cd08 100755 --- a/git-send-email.perl +++ b/git-send-email.perl @@ -491,7 +491,6 @@ sub config_regexp { "bcc=s" => \@getopt_bcc, "no-bcc" => \$no_bcc, "chain-reply-to!" => \$chain_reply_to, - "no-chain-reply-to" => sub {$chain_reply_to = 0}, "sendmail-cmd=s" => \$sendmail_cmd, "smtp-server=s" => \$smtp_server, "smtp-server-option=s" => \@smtp_server_options, @@ -506,36 +505,27 @@ sub config_regexp { "smtp-auth=s" => \$smtp_auth, "no-smtp-auth" => sub {$smtp_auth = 'none'}, "annotate!" => \$annotate, - "no-annotate" => sub {$annotate = 0}, "compose" => \$compose, "quiet" => \$quiet, "cc-cmd=s" => \$cc_cmd, "header-cmd=s" => \$header_cmd, "no-header-cmd" => \$no_header_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}, + "cc-cover!" => \$cover_cc, + "to-cover!" => \$cover_to, "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}, "batch-size=i" => \$batch_size, "relogin-delay=i" => \$relogin_delay, "git-completion-helper" => \$git_completion_helper, -- 2.42.1