From 5217a3d2d0c5dcffd7c8b6c05ed33513981235e4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C4=90o=C3=A0n=20Tr=E1=BA=A7n=20C=C3=B4ng=20Danh?= Date: Fri, 15 Oct 2021 20:03:35 +0700 Subject: [PATCH] git: update to 2.33.1. --- ...-first-config-key-wins-regression-in.patch | 108 ------------------ srcpkgs/git/template | 6 +- 2 files changed, 3 insertions(+), 111 deletions(-) delete mode 100644 srcpkgs/git/patches/0001-send-email-fix-a-first-config-key-wins-regression-in.patch diff --git a/srcpkgs/git/patches/0001-send-email-fix-a-first-config-key-wins-regression-in.patch b/srcpkgs/git/patches/0001-send-email-fix-a-first-config-key-wins-regression-in.patch deleted file mode 100644 index 8b6bdc1efbc..00000000000 --- a/srcpkgs/git/patches/0001-send-email-fix-a-first-config-key-wins-regression-in.patch +++ /dev/null @@ -1,108 +0,0 @@ -From b996f84989f78c8f6d2429b5f0b9785e13f7af23 Mon Sep 17 00:00:00 2001 -From: Ævar Arnfjörð Bjarmason -Date: Mon, 6 Sep 2021 09:33:29 +0200 -Subject: [PATCH] send-email: fix a "first config key wins" regression in - v2.33.0 -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -Fix a regression in my c95e3a3f0b8 (send-email: move trivial config -handling to Perl, 2021-05-28) where we'd pick the first config key out -of multiple defined ones, instead of using the normal "last key wins" -semantics of "git config --get". - -This broke e.g. cases where a .git/config would have a different -sendemail.smtpServer than ~/.gitconfig. We'd pick the ~/.gitconfig -over .git/config, instead of preferring the repository-local -version. The same would go for /etc/gitconfig etc. - -The full list of impacted config keys (the %config_settings values -which are references to scalars, not arrays) is: - - sendemail.smtpencryption - sendemail.smtpserver - sendemail.smtpserverport - sendemail.smtpuser - sendemail.smtppass - sendemail.smtpdomain - sendemail.smtpauth - sendemail.smtpbatchsize - sendemail.smtprelogindelay - sendemail.tocmd - sendemail.cccmd - sendemail.aliasfiletype - sendemail.envelopesender - sendemail.confirm - sendemail.from - sendemail.assume8bitencoding - sendemail.composeencoding - sendemail.transferencoding - sendemail.sendmailcmd - -I.e. having any of these set in say ~/.gitconfig and in-repo -.git/config regressed in v2.33.0 to prefer the --global one over the ---local. - -To test this add a test of config priority to one of these config -variables, most don't have tests at all, but there was an existing one -for sendemail.8bitEncoding. - -The "git config" (instead of "test_config") is somewhat of an -anti-pattern, but follows established conventions in -t9001-send-email.sh, likewise with any other pattern or idiom in this -test. - -The populating of home/.gitconfig and setting of HOME= is copied from -a test in t0017-env-helper.sh added in 1ff750b128e (tests: make -GIT_TEST_GETTEXT_POISON a boolean, 2019-06-21). This test fails -without this bugfix, but now it works. - -Reported-by: Eli Schwartz -Tested-by: Eli Schwartz -Signed-off-by: Ævar Arnfjörð Bjarmason -Signed-off-by: Junio C Hamano ---- - git-send-email.perl | 2 +- - t/t9001-send-email.sh | 15 +++++++++++++++ - 2 files changed, 16 insertions(+), 1 deletion(-) - -diff --git a/git-send-email.perl b/git-send-email.perl -index 5791138683..0a6dcc1f88 100755 ---- a/git-send-email.perl -+++ b/git-send-email.perl -@@ -373,7 +373,7 @@ sub read_config { - @$target = @values; - } - else { -- my $v = $known_keys->{$key}->[0]; -+ my $v = $known_keys->{$key}->[-1]; - next unless defined $v; - next if $configured->{$setting}++; - $$target = $v; -diff --git a/t/t9001-send-email.sh b/t/t9001-send-email.sh -index 612de095fd..fd680a90ac 100755 ---- a/t/t9001-send-email.sh -+++ b/t/t9001-send-email.sh -@@ -1533,6 +1533,21 @@ test_expect_success $PREREQ 'sendemail.8bitEncoding works' ' - test_cmp content-type-decl actual - ' - -+test_expect_success $PREREQ 'sendemail.8bitEncoding in .git/config overrides --global .gitconfig' ' -+ clean_fake_sendmail && -+ git config sendemail.assume8bitEncoding UTF-8 && -+ test_when_finished "rm -rf home" && -+ mkdir home && -+ git config -f home/.gitconfig sendemail.assume8bitEncoding "bogus too" && -+ echo bogus | -+ env HOME="$(pwd)/home" DEBUG=1 \ -+ git send-email --from=author@example.com --to=nobody@example.com \ -+ --smtp-server="$(pwd)/fake.sendmail" \ -+ email-using-8bit >stdout && -+ egrep "Content|MIME" msgtxt1 >actual && -+ test_cmp content-type-decl actual -+' -+ - test_expect_success $PREREQ '--8bit-encoding overrides sendemail.8bitEncoding' ' - clean_fake_sendmail && - git config sendemail.assume8bitEncoding "bogus too" && diff --git a/srcpkgs/git/template b/srcpkgs/git/template index 87923c5a6a8..80222b74075 100644 --- a/srcpkgs/git/template +++ b/srcpkgs/git/template @@ -1,7 +1,7 @@ # Template file for 'git' pkgname=git -version=2.33.0 -revision=3 +version=2.33.1 +revision=1 hostmakedepends="asciidoc gettext perl pkg-config tk xmlto" makedepends="libglib-devel libcurl-devel libsecret-devel pcre2-devel tk-devel" # Required by https:// @@ -14,7 +14,7 @@ license="GPL-2.0-only" homepage="https://git-scm.com/" changelog="https://raw.githubusercontent.com/git/git/master/Documentation/RelNotes/${version}.txt" distfiles="https://www.kernel.org/pub/software/scm/git/git-${version}.tar.xz" -checksum=bf3c6ab5f82e072aad4768f647cfb1ef60aece39855f83f080f9c0222dd20c4f +checksum=e054a6e6c2b088bd1bff5f61ed9ba5aa91c9a3cd509539a4b41c5ddf02201f2f replaces="git-perl>=0" register_shell=/usr/bin/git-shell python_version=3