diff options
Diffstat (limited to 'system/git')
-rw-r--r-- | system/git/0001-gc-use-s-type-character-for-fscanf.patch | 33 | ||||
-rw-r--r-- | system/git/APKBUILD | 68 | ||||
-rw-r--r-- | system/git/disable-t2082-2.patch | 36 | ||||
-rw-r--r-- | system/git/dont-test-other-encodings.patch | 139 | ||||
-rw-r--r-- | system/git/perl-getopt-long.patch | 459 |
5 files changed, 534 insertions, 201 deletions
diff --git a/system/git/0001-gc-use-s-type-character-for-fscanf.patch b/system/git/0001-gc-use-s-type-character-for-fscanf.patch deleted file mode 100644 index e3fe78cf6..000000000 --- a/system/git/0001-gc-use-s-type-character-for-fscanf.patch +++ /dev/null @@ -1,33 +0,0 @@ -From afceb0f7755a87d0dd2194e95f26c9dc8f4bc688 Mon Sep 17 00:00:00 2001 -From: "A. Wilcox" <AWilcox@Wilcox-Tech.com> -Date: Fri, 15 Sep 2017 23:55:57 -0500 -Subject: [PATCH] gc: use 's' type character for fscanf - -The ISO C standard states that using a field width together with the 'c' -type character will read the exact amount specified; if that amount of -bytes is not available, a match error occurs. - -This patch allows the t6500 test to pass on the musl libc, and `git gc` -to behave correctly on systems utilising musl. - -Signed-off-by: A. Wilcox <AWilcox@Wilcox-Tech.com> ---- - builtin/gc.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/builtin/gc.c b/builtin/gc.c -index 3c78fcb..bb2d6c1 100644 ---- a/builtin/gc.c -+++ b/builtin/gc.c -@@ -258,7 +258,7 @@ static const char *lock_repo_for_gc(int force, pid_t* ret_pid) - int should_exit; - - if (!scan_fmt) -- scan_fmt = xstrfmt("%s %%%dc", "%"SCNuMAX, HOST_NAME_MAX); -+ scan_fmt = xstrfmt("%s %%%ds", "%"SCNuMAX, HOST_NAME_MAX); - fp = fopen(pidfile_path, "r"); - memset(locking_host, 0, sizeof(locking_host)); - should_exit = --- -2.10.0 - diff --git a/system/git/APKBUILD b/system/git/APKBUILD index 4fb71e2a5..0562bfba2 100644 --- a/system/git/APKBUILD +++ b/system/git/APKBUILD @@ -1,21 +1,16 @@ # Contributor: Łukasz Jendrysik <scadu@yandex.com> # Maintainer: A. Wilcox <awilfox@adelielinux.org> pkgname=git -pkgver=2.22.1 -pkgrel=0 -pkgdesc="A distributed version control system" +pkgver=2.40.0 +pkgrel=1 +pkgdesc="Distributed version control system" url="https://www.git-scm.com/" arch="all" license="GPL-2.0+" depends="perl-error" -replaces="git-perl perl-git" - -# secfixes: -# 2.19.2: -# - CVE-2018-19486 -# 2.14.1: -# - CVE-2017-1000117 - +checkdepends="python3" +makedepends="zlib-dev openssl-dev curl-dev expat-dev perl-dev + pcre2-dev asciidoctor xmlto perl-error docbook-xsl-ns" # note that order matters subpackages="$pkgname-doc $pkgname-bash-completion:completion:noarch @@ -24,24 +19,44 @@ subpackages="$pkgname-doc $pkgname-cvs::noarch $pkgname-p4::noarch $pkgname-daemon - $pkgname-gitweb + $pkgname-gitweb::noarch $pkgname-subtree::noarch - $pkgname-subtree-doc:subtree_doc:noarch + $pkgname-lang " -makedepends="zlib-dev openssl-dev curl-dev expat-dev perl-dev - pcre2-dev asciidoctor xmlto perl-error" -checkdepends="python3" +replaces="git-perl perl-git" source="https://www.kernel.org/pub/software/scm/git/git-$pkgver.tar.xz dont-test-other-encodings.patch git-daemon.initd git-daemon.confd + + disable-t2082-2.patch + perl-getopt-long.patch " _gitcoredir=/usr/libexec/git-core +# secfixes: +# 2.25.4-r0: +# - CVE-2020-11008 +# 2.25.3-r0: +# - CVE-2020-5260 +# 2.24.1-r0: +# - CVE-2019-1348 +# - CVE-2019-1349 +# - CVE-2019-1350 +# - CVE-2019-1351 +# - CVE-2019-1352 +# - CVE-2019-1353 +# - CVE-2019-1354 +# - CVE-2019-1387 +# - CVE-2019-19604 +# 2.19.2-r0: +# - CVE-2018-19486 +# 2.14.1-r0: +# - CVE-2017-1000117 + prepare() { default_prepare cat >> config.mak <<-EOF - NO_GETTEXT=YesPlease NO_SVN_TESTS=YesPlease NO_REGEX=YesPlease USE_ASCIIDOCTOR=1 @@ -57,7 +72,6 @@ build() { } check() { - rm t/t9020-remote-svn.sh # Requires /usr/bin/python / python-compat. make prefix=/usr DESTDIR="$pkgdir" -j1 test } @@ -154,17 +168,9 @@ subtree() { make install prefix=/usr DESTDIR="$subpkgdir" } -subtree_doc() { - depends="" - pkgdesc="Split git repository into subtrees (documentation)" - replaces="" - - cd "$builddir"/contrib/subtree - make install-man prefix=/usr DESTDIR="$subpkgdir" - gzip -9 "$subpkgdir"/usr/share/man/man1/git-subtree.1 -} - -sha512sums="8fa0900e1a583cdacbafa2e0d00a4cb50ad225c11227f6a811b721e56677b62b1354995e2b7117a66b1e89dbcb2cddc1eee7ef1e57723d9615a063a318095f14 git-2.22.1.tar.xz -315e4666c425b31a7f7a447e777cbf2a1050feac9b4d4b8a61c05248024e790d4d18f3336faf2a2c68584e05e8194c22a09e1caba1352cfec194e0bc01277a6c dont-test-other-encodings.patch +sha512sums="a2720f8f9a0258c0bb5e23badcfd68a147682e45a5d039a42c47128296c508109d5039029db89311a35db97a9008585e84ed11b400846502c9be913d67f0fd90 git-2.40.0.tar.xz +4bcc8367478601c856e0977d46fc4842f62daf300093a576704ad27ccd9fae975f95d3fbfcb00e9fa7254b1db64cd074f49a94fb5cf0abd8d72d7edc9ab8798c dont-test-other-encodings.patch 89528cdd14c51fd568aa61cf6c5eae08ea0844e59f9af9292da5fc6c268261f4166017d002d494400945e248df6b844e2f9f9cd2d9345d516983f5a110e4c42a git-daemon.initd -fbf1f425206a76e2a8f82342537ed939ff7e623d644c086ca2ced5f69b36734695f9f80ebda1728f75a94d6cd2fcb71bf845b64239368caab418e4d368c141ec git-daemon.confd" +fbf1f425206a76e2a8f82342537ed939ff7e623d644c086ca2ced5f69b36734695f9f80ebda1728f75a94d6cd2fcb71bf845b64239368caab418e4d368c141ec git-daemon.confd +6d7cbb701584a078328056a67bfd32dde5795a80c0911734b38bd534699fb0165ac2b486b267c5c39b90bbb0d7c5ab0ab6ada1d068748865617326da28304eb4 disable-t2082-2.patch +9800318f9e6a8b6bfd8c700cce5cc326522a607b89236a868ef46940efe0566fdadf5d69dc3e72f989d61df66be8510b8989bd4ce3fc780f017f30652c7e9efa perl-getopt-long.patch" diff --git a/system/git/disable-t2082-2.patch b/system/git/disable-t2082-2.patch new file mode 100644 index 000000000..b18a9caa7 --- /dev/null +++ b/system/git/disable-t2082-2.patch @@ -0,0 +1,36 @@ +--- a/t/t2082-parallel-checkout-attributes.sh 2021-11-24 19:29:21.000000000 +0000 ++++ b/t/t2082-parallel-checkout-attributes.sh 2022-01-12 17:29:58.890000000 +0000 +@@ -33,33 +33,6 @@ + ) + ' + +-test_expect_success 'parallel-checkout with re-encoding' ' +- set_checkout_config 2 0 && +- git init encoding && +- ( +- cd encoding && +- echo text >utf8-text && +- write_utf16 <utf8-text >utf16-text && +- +- echo "A working-tree-encoding=UTF-16" >.gitattributes && +- cp utf16-text A && +- cp utf8-text B && +- git add A B .gitattributes && +- git commit -m encoding && +- +- # Check that A is stored in UTF-8 +- git cat-file -p :A >A.internal && +- test_cmp_bin utf8-text A.internal && +- +- rm A B && +- test_checkout_workers 2 git checkout A B && +- +- # Check that A (and only A) is re-encoded during checkout +- test_cmp_bin utf16-text A && +- test_cmp_bin utf8-text B +- ) +-' +- + test_expect_success 'parallel-checkout with eol conversions' ' + set_checkout_config 2 0 && + git init eol && diff --git a/system/git/dont-test-other-encodings.patch b/system/git/dont-test-other-encodings.patch index 9019d4cab..fed4a6e21 100644 --- a/system/git/dont-test-other-encodings.patch +++ b/system/git/dont-test-other-encodings.patch @@ -1,140 +1,5 @@ We can't support Japanese people using musl ---- git-2.14.1/t/t3900-i18n-commit.sh.old 2017-08-09 14:54:31.000000000 -0500 -+++ git-2.14.1/t/t3900-i18n-commit.sh 2017-09-10 21:10:09.269860087 -0500 -@@ -76,132 +76,4 @@ - test_i18ngrep "did not conform" "$HOME"/stderr - ' - --for H in ISO8859-1 eucJP ISO-2022-JP --do -- test_expect_success "$H setup" ' -- git config i18n.commitencoding $H && -- git checkout -b $H C0 && -- echo $H >F && -- git commit -a -F "$TEST_DIRECTORY"/t3900/$H.txt -- ' --done -- --for H in ISO8859-1 eucJP ISO-2022-JP --do -- test_expect_success "check encoding header for $H" ' -- E=$(git cat-file commit '$H' | sed -ne "s/^encoding //p") && -- test "z$E" = "z'$H'" -- ' --done -- --test_expect_success 'config to remove customization' ' -- git config --unset-all i18n.commitencoding && -- if Z=$(git config --get-all i18n.commitencoding) -- then -- echo Oops, should have failed. -- false -- else -- test z = "z$Z" -- fi && -- git config i18n.commitencoding UTF-8 --' -- --test_expect_success 'ISO8859-1 should be shown in UTF-8 now' ' -- compare_with ISO8859-1 "$TEST_DIRECTORY"/t3900/1-UTF-8.txt --' -- --for H in eucJP ISO-2022-JP --do -- test_expect_success "$H should be shown in UTF-8 now" ' -- compare_with '$H' "$TEST_DIRECTORY"/t3900/2-UTF-8.txt -- ' --done -- --test_expect_success 'config to add customization' ' -- git config --unset-all i18n.commitencoding && -- if Z=$(git config --get-all i18n.commitencoding) -- then -- echo Oops, should have failed. -- false -- else -- test z = "z$Z" -- fi --' -- --for H in ISO8859-1 eucJP ISO-2022-JP --do -- test_expect_success "$H should be shown in itself now" ' -- git config i18n.commitencoding '$H' && -- compare_with '$H' "$TEST_DIRECTORY"/t3900/'$H'.txt -- ' --done -- --test_expect_success 'config to tweak customization' ' -- git config i18n.logoutputencoding UTF-8 --' -- --test_expect_success 'ISO8859-1 should be shown in UTF-8 now' ' -- compare_with ISO8859-1 "$TEST_DIRECTORY"/t3900/1-UTF-8.txt --' -- --for H in eucJP ISO-2022-JP --do -- test_expect_success "$H should be shown in UTF-8 now" ' -- compare_with '$H' "$TEST_DIRECTORY"/t3900/2-UTF-8.txt -- ' --done -- --for J in eucJP ISO-2022-JP --do -- if test "$J" = ISO-2022-JP -- then -- ICONV=$J -- else -- ICONV= -- fi -- git config i18n.logoutputencoding $J -- for H in eucJP ISO-2022-JP -- do -- test_expect_success "$H should be shown in $J now" ' -- compare_with '$H' "$TEST_DIRECTORY"/t3900/'$J'.txt $ICONV -- ' -- done --done -- --for H in ISO8859-1 eucJP ISO-2022-JP --do -- test_expect_success "No conversion with $H" ' -- compare_with "--encoding=none '$H'" "$TEST_DIRECTORY"/t3900/'$H'.txt -- ' --done -- --test_commit_autosquash_flags () { -- H=$1 -- flag=$2 -- test_expect_success "commit --$flag with $H encoding" ' -- git config i18n.commitencoding $H && -- git checkout -b $H-$flag C0 && -- echo $H >>F && -- git commit -a -F "$TEST_DIRECTORY"/t3900/$H.txt && -- test_tick && -- echo intermediate stuff >>G && -- git add G && -- git commit -a -m "intermediate commit" && -- test_tick && -- echo $H $flag >>F && -- git commit -a --$flag HEAD~1 && -- E=$(git cat-file commit '$H-$flag' | -- sed -ne "s/^encoding //p") && -- test "z$E" = "z$H" && -- git config --unset-all i18n.commitencoding && -- git rebase --autosquash -i HEAD^^^ && -- git log --oneline >actual && -- test_line_count = 3 actual -- ' --} -- --test_commit_autosquash_flags eucJP fixup -- --test_commit_autosquash_flags ISO-2022-JP squash -- - test_done --- git-2.14.1/t/t5100-mailinfo.sh.old 2017-08-09 14:54:31.000000000 -0500 +++ git-2.14.1/t/t5100-mailinfo.sh 2017-09-10 23:26:39.206126739 -0500 @@ -27,6 +27,7 @@ @@ -193,7 +58,7 @@ We can't support Japanese people using musl summary $UTF8_MSG --- git-2.21.0/t/t0028-working-tree-encoding.sh.old 2019-02-24 16:31:46.000000000 +0000 +++ git-2.21.0/t/t0028-working-tree-encoding.sh 2019-03-08 00:49:07.580000000 +0000 -@@ -71,14 +71,6 @@ +@@ -51,14 +51,6 @@ test_cmp_bin test.utf8.raw test.utf16.git ' @@ -208,7 +73,7 @@ We can't support Japanese people using musl test_expect_success 're-encode to UTF-16-LE-BOM on checkout' ' rm test.utf16lebom && git checkout test.utf16lebom && -@@ -143,41 +135,6 @@ +@@ -123,41 +115,6 @@ test_i18ngrep "fatal: BOM is required .* utf-${i}" err.out && test_i18ngrep "use UTF-${i}BE or UTF-${i}LE" err.out ' diff --git a/system/git/perl-getopt-long.patch b/system/git/perl-getopt-long.patch new file mode 100644 index 000000000..dd5776033 --- /dev/null +++ b/system/git/perl-getopt-long.patch @@ -0,0 +1,459 @@ +From 46edab516bf04c190cb2e100419dee817d3f33f6 Mon Sep 17 00:00:00 2001 +From: Todd Zullinger <tmz@pobox.com> +Date: Wed, 15 Nov 2023 12:39:44 -0500 +Subject: [PATCH] send-email: remove stray characters from usage + +A few stray single quotes crept into the usage string in a2ce608244 +(send-email docs: add format-patch options, 2021-10-25). Remove them. + +Signed-off-by: Todd Zullinger <tmz@pobox.com> +Signed-off-by: Junio C Hamano <gitster@pobox.com> +--- + git-send-email.perl | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/git-send-email.perl b/git-send-email.perl +index 897cea6564fb50..85544a18bfe37e 100755 +--- a/git-send-email.perl ++++ b/git-send-email.perl +@@ -28,8 +28,8 @@ + + sub usage { + print <<EOT; +-git send-email' [<options>] <file|directory> +-git send-email' [<options>] <format-patch options> ++git send-email [<options>] <file|directory> ++git send-email [<options>] <format-patch options> + git send-email --dump-aliases + + Composing: +From d13a73e383076636534e10ba799af0c9a2b85357 Mon Sep 17 00:00:00 2001 +From: Todd Zullinger <tmz@pobox.com> +Date: Thu, 16 Nov 2023 14:30:10 -0500 +Subject: [PATCH] perl: bump the required Perl version to 5.8.1 from 5.8.0 + +The following commit will make use of a Getopt::Long feature which is +only present in Perl >= 5.8.1. Document that as the minimum version we +support. + +Many of our Perl scripts will continue to run with 5.8.0 but this change +allows us to adjust them as needed without breaking any promises to our +users. + +The Perl requirement was last changed in d48b284183 (perl: bump the +required Perl version to 5.8 from 5.6.[21], 2010-09-24). At that time, +5.8.0 was 8 years old. It is now over 21 years old. + +Signed-off-by: Todd Zullinger <tmz@pobox.com> +Signed-off-by: Junio C Hamano <gitster@pobox.com> +--- + Documentation/CodingGuidelines | 2 +- + INSTALL | 2 +- + contrib/diff-highlight/DiffHighlight.pm | 2 +- + contrib/mw-to-git/Git/Mediawiki.pm | 2 +- + git-archimport.perl | 2 +- + git-cvsexportcommit.perl | 2 +- + git-cvsimport.perl | 2 +- + git-cvsserver.perl | 2 +- + git-send-email.perl | 4 ++-- + git-svn.perl | 2 +- + gitweb/INSTALL | 2 +- + gitweb/gitweb.perl | 2 +- + perl/Git.pm | 2 +- + perl/Git/I18N.pm | 2 +- + perl/Git/LoadCPAN.pm | 2 +- + perl/Git/LoadCPAN/Error.pm | 2 +- + perl/Git/LoadCPAN/Mail/Address.pm | 2 +- + perl/Git/Packet.pm | 2 +- + t/t0202/test.pl | 2 +- + t/t5562/invoke-with-content-length.pl | 2 +- + t/t9700/test.pl | 2 +- + t/test-terminal.perl | 2 +- + 22 files changed, 23 insertions(+), 23 deletions(-) + +diff --git a/Documentation/CodingGuidelines b/Documentation/CodingGuidelines +index 65af8d82cedd5f..aa0195d6ebab0b 100644 +--- a/Documentation/CodingGuidelines ++++ b/Documentation/CodingGuidelines +@@ -490,7 +490,7 @@ For Perl programs: + + - 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. + +diff --git a/INSTALL b/INSTALL +index 4b422888828d0e..06f29a8ae70022 100644 +--- a/INSTALL ++++ b/INSTALL +@@ -119,7 +119,7 @@ Issues of note: + - A POSIX-compliant shell is required to run some scripts needed + 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", + interacting with svn repositories with "git svn"). If you can + live without these, use NO_PERL. Note that recent releases of +diff --git a/contrib/diff-highlight/DiffHighlight.pm b/contrib/diff-highlight/DiffHighlight.pm +index 376f577737591e..636add69680675 100644 +--- a/contrib/diff-highlight/DiffHighlight.pm ++++ b/contrib/diff-highlight/DiffHighlight.pm +@@ -1,6 +1,6 @@ + package DiffHighlight; + +-use 5.008; ++use 5.008001; + use warnings FATAL => 'all'; + use strict; + +diff --git a/contrib/mw-to-git/Git/Mediawiki.pm b/contrib/mw-to-git/Git/Mediawiki.pm +index 917d9e2d3222c1..ff7811225ee671 100644 +--- a/contrib/mw-to-git/Git/Mediawiki.pm ++++ b/contrib/mw-to-git/Git/Mediawiki.pm +@@ -1,6 +1,6 @@ + package Git::Mediawiki; + +-use 5.008; ++use 5.008001; + use strict; + use POSIX; + use Git; +diff --git a/git-archimport.perl b/git-archimport.perl +index b7c173c345544d..f5a317b89961ce 100755 +--- a/git-archimport.perl ++++ b/git-archimport.perl +@@ -54,7 +54,7 @@ =head1 Devel Notes + + =cut + +-use 5.008; ++use 5.008001; + use strict; + use warnings; + use Getopt::Std; +diff --git a/git-cvsexportcommit.perl b/git-cvsexportcommit.perl +index 289d4bc684dc26..1e03ba94d1b271 100755 +--- a/git-cvsexportcommit.perl ++++ b/git-cvsexportcommit.perl +@@ -1,6 +1,6 @@ + #!/usr/bin/perl + +-use 5.008; ++use 5.008001; + use strict; + use warnings; + use Getopt::Std; +diff --git a/git-cvsimport.perl b/git-cvsimport.perl +index 7bf3c12d678974..07ea3443f7f336 100755 +--- a/git-cvsimport.perl ++++ b/git-cvsimport.perl +@@ -13,7 +13,7 @@ + # The head revision is on branch "origin" by default. + # You can change that with the '-o' option. + +-use 5.008; ++use 5.008001; + use strict; + use warnings; + use Getopt::Long; +diff --git a/git-cvsserver.perl b/git-cvsserver.perl +index 7b757360e28c01..124f598bdc0705 100755 +--- a/git-cvsserver.perl ++++ b/git-cvsserver.perl +@@ -15,7 +15,7 @@ + #### + #### + +-use 5.008; ++use 5.008001; + use strict; + use warnings; + use bytes; +diff --git a/git-send-email.perl b/git-send-email.perl +index 897cea6564fb50..041db702d46fcc 100755 +--- a/git-send-email.perl ++++ b/git-send-email.perl +@@ -16,7 +16,7 @@ + # and second line is the subject of the message. + # + +-use 5.008; ++use 5.008001; + use strict; + use warnings $ENV{GIT_PERL_FATAL_WARNINGS} ? qw(FATAL all) : (); + use Getopt::Long; +@@ -228,7 +228,7 @@ sub system_or_msg { + my @sprintf_args = ($cmd_name ? $cmd_name : $args->[0], $exit_code); + if (defined $msg) { + # 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 + # introduced in perl 5.22, and asking for it will die + # on older perls. +diff --git a/git-svn.perl b/git-svn.perl +index be987e316f92ac..1d1c52f42468b1 100755 +--- a/git-svn.perl ++++ b/git-svn.perl +@@ -1,7 +1,7 @@ + #!/usr/bin/perl + # Copyright (C) 2006, Eric Wong <normalperson@yhbt.net> + # License: GPL v2 or later +-use 5.008; ++use 5.008001; + use warnings $ENV{GIT_PERL_FATAL_WARNINGS} ? qw(FATAL all) : (); + use strict; + use vars qw/ $AUTHOR $VERSION +diff --git a/gitweb/INSTALL b/gitweb/INSTALL +index a58e6b3c44b0ef..dadc6efa81f035 100644 +--- a/gitweb/INSTALL ++++ b/gitweb/INSTALL +@@ -29,7 +29,7 @@ Requirements + ------------ + + - Core git tools +- - Perl 5.8 ++ - Perl 5.8.1 + - Perl modules: CGI, Encode, Fcntl, File::Find, File::Basename. + - web server + +diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl +index e66eb3d9bad7cf..55e7c6567e6c47 100755 +--- a/gitweb/gitweb.perl ++++ b/gitweb/gitweb.perl +@@ -7,7 +7,7 @@ + # + # This program is licensed under the GPLv2 + +-use 5.008; ++use 5.008001; + use strict; + use warnings; + # handle ACL in file access tests +diff --git a/perl/Git.pm b/perl/Git.pm +index 117765dc73c4a8..03bf570bf4c852 100644 +--- a/perl/Git.pm ++++ b/perl/Git.pm +@@ -7,7 +7,7 @@ Git - Perl interface to the Git version control system + + package Git; + +-use 5.008; ++use 5.008001; + use strict; + use warnings $ENV{GIT_PERL_FATAL_WARNINGS} ? qw(FATAL all) : (); + +diff --git a/perl/Git/I18N.pm b/perl/Git/I18N.pm +index 895e759c57a9d9..5454c3a6d2c433 100644 +--- a/perl/Git/I18N.pm ++++ b/perl/Git/I18N.pm +@@ -1,5 +1,5 @@ + package Git::I18N; +-use 5.008; ++use 5.008001; + use strict; + use warnings $ENV{GIT_PERL_FATAL_WARNINGS} ? qw(FATAL all) : (); + BEGIN { +diff --git a/perl/Git/LoadCPAN.pm b/perl/Git/LoadCPAN.pm +index 0c360bc7998607..8c7fa805f97390 100644 +--- a/perl/Git/LoadCPAN.pm ++++ b/perl/Git/LoadCPAN.pm +@@ -1,5 +1,5 @@ + package Git::LoadCPAN; +-use 5.008; ++use 5.008001; + use strict; + use warnings $ENV{GIT_PERL_FATAL_WARNINGS} ? qw(FATAL all) : (); + +diff --git a/perl/Git/LoadCPAN/Error.pm b/perl/Git/LoadCPAN/Error.pm +index 5d84c202884b7c..5cecb0fcd6930a 100644 +--- a/perl/Git/LoadCPAN/Error.pm ++++ b/perl/Git/LoadCPAN/Error.pm +@@ -1,5 +1,5 @@ + package Git::LoadCPAN::Error; +-use 5.008; ++use 5.008001; + use strict; + use warnings $ENV{GIT_PERL_FATAL_WARNINGS} ? qw(FATAL all) : (); + use Git::LoadCPAN ( +diff --git a/perl/Git/LoadCPAN/Mail/Address.pm b/perl/Git/LoadCPAN/Mail/Address.pm +index 340e88a7a56be3..9f808090a66a16 100644 +--- a/perl/Git/LoadCPAN/Mail/Address.pm ++++ b/perl/Git/LoadCPAN/Mail/Address.pm +@@ -1,5 +1,5 @@ + package Git::LoadCPAN::Mail::Address; +-use 5.008; ++use 5.008001; + use strict; + use warnings $ENV{GIT_PERL_FATAL_WARNINGS} ? qw(FATAL all) : (); + use Git::LoadCPAN ( +diff --git a/perl/Git/Packet.pm b/perl/Git/Packet.pm +index d144f5168f37ad..d896e6952399b0 100644 +--- a/perl/Git/Packet.pm ++++ b/perl/Git/Packet.pm +@@ -1,5 +1,5 @@ + package Git::Packet; +-use 5.008; ++use 5.008001; + use strict; + use warnings $ENV{GIT_PERL_FATAL_WARNINGS} ? qw(FATAL all) : (); + BEGIN { +diff --git a/t/t0202/test.pl b/t/t0202/test.pl +index 2cbf7b95907384..47d96a2a13f93b 100755 +--- a/t/t0202/test.pl ++++ b/t/t0202/test.pl +@@ -1,5 +1,5 @@ + #!/usr/bin/perl +-use 5.008; ++use 5.008001; + use lib (split(/:/, $ENV{GITPERLLIB})); + use strict; + use warnings; +diff --git a/t/t5562/invoke-with-content-length.pl b/t/t5562/invoke-with-content-length.pl +index 718dd9b49d493e..9babb9a375e5fb 100644 +--- a/t/t5562/invoke-with-content-length.pl ++++ b/t/t5562/invoke-with-content-length.pl +@@ -1,4 +1,4 @@ +-use 5.008; ++use 5.008001; + use strict; + use warnings; + +diff --git a/t/t9700/test.pl b/t/t9700/test.pl +index 6d753708d2acb6..d8e85482ab2ba7 100755 +--- a/t/t9700/test.pl ++++ b/t/t9700/test.pl +@@ -1,7 +1,7 @@ + #!/usr/bin/perl + use lib (split(/:/, $ENV{GITPERLLIB})); + +-use 5.008; ++use 5.008001; + use warnings; + use strict; + +diff --git a/t/test-terminal.perl b/t/test-terminal.perl +index 1bcf01a9a42a61..3810e9bb431903 100755 +--- a/t/test-terminal.perl ++++ b/t/test-terminal.perl +@@ -1,5 +1,5 @@ + #!/usr/bin/perl +-use 5.008; ++use 5.008001; + use strict; + use warnings; + use IO::Pty; +From 6ff658cc78f36baa74c0f25314b0043a8f4b4fc6 Mon Sep 17 00:00:00 2001 +From: Todd Zullinger <tmz@pobox.com> +Date: Thu, 16 Nov 2023 14:30:11 -0500 +Subject: [PATCH] send-email: avoid duplicate specification warnings + +A warning is issued for options which are specified more than once +beginning with perl-Getopt-Long >= 2.55. In addition to causing users +to see warnings, this results in test failures which compare the output. +An example, from t9001-send-email.37: + + | +++ diff -u expect actual + | --- expect 2023-11-14 10:38:23.854346488 +0000 + | +++ actual 2023-11-14 10:38:23.848346466 +0000 + | @@ -1,2 +1,7 @@ + | +Duplicate specification "no-chain-reply-to" for option "no-chain-reply-to" + | +Duplicate specification "to-cover|to-cover!" for option "to-cover" + | +Duplicate specification "cc-cover|cc-cover!" for option "cc-cover" + | +Duplicate specification "no-thread" for option "no-thread" + | +Duplicate specification "no-to-cover" for option "no-to-cover" + | fatal: longline.patch:35 is longer than 998 characters + | warning: no patches were sent + | error: last command exited with $?=1 + | not ok 37 - reject long lines + +Remove the duplicate option specs. These are primarily the explicit +'--no-' prefix opts which were added in f471494303 (git-send-email.perl: +support no- prefix with older GetOptions, 2015-01-30). This was done +specifically to support perl-5.8.0 which includes Getopt::Long 2.32[1]. + +Getopt::Long 2.33 added support for the '--no-' prefix natively by +appending '!' to the option specification string, which was included in +perl-5.8.1 and is not present in perl-5.8.0. The previous commit bumped +the minimum supported Perl version to 5.8.1 so we no longer need to +provide the '--no-' variants for negatable options manually. + +Teach `--git-completion-helper` to output the '--no-' options. They are +not included in the options hash and would otherwise be lost. + +Signed-off-by: Todd Zullinger <tmz@pobox.com> +Signed-off-by: Junio C Hamano <gitster@pobox.com> +--- + git-send-email.perl | 19 ++++++------------- + 1 file changed, 6 insertions(+), 13 deletions(-) + +diff --git a/git-send-email.perl b/git-send-email.perl +index 041db702d46fcc..60afafb375d8f4 100755 +--- a/git-send-email.perl ++++ b/git-send-email.perl +@@ -119,13 +119,16 @@ sub completion_helper { + + foreach my $key (keys %$original_opts) { + unless (exists $not_for_completion{$key}) { +- $key =~ s/!$//; ++ my $negatable = ($key =~ s/!$//); + + if ($key =~ /[:=][si]$/) { + $key =~ s/[:=][si]$//; + push (@send_email_opts, "--$_=") foreach (split (/\|/, $key)); + } else { + push (@send_email_opts, "--$_") foreach (split (/\|/, $key)); ++ if ($negatable) { ++ push (@send_email_opts, "--no-$_") foreach (split (/\|/, $key)); ++ } + } + } + } +@@ -491,7 +494,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,34 +508,25 @@ 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, + "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, |