Update to 2.23.0-rc0
Adjust the test to skip in t5541-http-push-smart as another test was added before the failing test. Apply a patch from Jeff King which fixes a failure in the newly-added t0016-oidmap on big endian systems like s390x¹. Release notes: https://www.kernel.org/pub/software/scm/git/docs/RelNotes/2.23.0.txt ¹ https://public-inbox.org/git/20190731012336.GA13880@sigill.intra.peff.net/
This commit is contained in:
parent
8faf6223ea
commit
f4c8506a97
@ -1,51 +0,0 @@
|
||||
From 69702523afb4de692b415648e53fcfb1b4630f18 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Nguy=E1=BB=85n=20Th=C3=A1i=20Ng=E1=BB=8Dc=20Duy?=
|
||||
<pclouds@gmail.com>
|
||||
Date: Wed, 12 Jun 2019 15:56:06 +0700
|
||||
Subject: [PATCH] completion: do not cache if --git-completion-helper fails
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
"git <cmd> --git-completion-helper" could fail if the command checks for
|
||||
a repo before parse_options(). If the result is cached, later on when
|
||||
the user moves to a worktree with repo, tab completion will still fail.
|
||||
|
||||
Avoid this by detecting errors and not cache the completion output. We
|
||||
can try again and hopefully succeed next time (e.g. when a repo is
|
||||
found).
|
||||
|
||||
Of course if --git-completion-helper fails permanently because of other
|
||||
reasons (*), this will slow down completion. But I don't see any better
|
||||
option to handle that case.
|
||||
|
||||
(*) one of those cases is if __gitcomp_builtin is called on a command
|
||||
that does not support --git-completion-helper. And we do have a
|
||||
generic call
|
||||
|
||||
__git_complete_common "$command"
|
||||
|
||||
but this case is protected with __git_support_parseopt_helper so we're
|
||||
good.
|
||||
|
||||
Reported-by: Felipe Contreras <felipe.contreras@gmail.com>
|
||||
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
|
||||
Signed-off-by: Junio C Hamano <gitster@pobox.com>
|
||||
---
|
||||
contrib/completion/git-completion.bash | 3 ++-
|
||||
1 file changed, 2 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash
|
||||
index 499e56f83d0a0..00cc695e3d748 100644
|
||||
--- a/contrib/completion/git-completion.bash
|
||||
+++ b/contrib/completion/git-completion.bash
|
||||
@@ -400,7 +400,8 @@ __gitcomp_builtin ()
|
||||
if [ -z "$options" ]; then
|
||||
# leading and trailing spaces are significant to make
|
||||
# option removal work correctly.
|
||||
- options=" $incl $(__git ${cmd/_/ } --git-completion-helper) "
|
||||
+ options=" $incl $(__git ${cmd/_/ } --git-completion-helper) " || return
|
||||
+
|
||||
for i in $excl; do
|
||||
options="${options/ $i / }"
|
||||
done
|
140
0001-t-sort-output-of-hashmap-iteration.patch
Normal file
140
0001-t-sort-output-of-hashmap-iteration.patch
Normal file
@ -0,0 +1,140 @@
|
||||
From e1e7a77141bda8f2ab02f5ed8b0030cba793ec2d Mon Sep 17 00:00:00 2001
|
||||
From: Jeff King <peff@peff.net>
|
||||
Date: Tue, 30 Jul 2019 21:23:37 -0400
|
||||
Subject: [PATCH] t: sort output of hashmap iteration
|
||||
|
||||
The iteration order of a hashmap is undefined, and may depend on things
|
||||
like the exact set of items added, or the table has been grown or
|
||||
shrunk. In the case of an oidmap, it even depends on endianness, because
|
||||
we take the oid hash by casting sha1 bytes directly into an unsigned
|
||||
int.
|
||||
|
||||
Let's sort the test-tool output from any hash iterators. In the case of
|
||||
t0011, this is just future-proofing. But for t0016, it actually fixes a
|
||||
reported failure on the big-endian s390 and nonstop ports.
|
||||
|
||||
I didn't bother to teach the helper functions to optionally sort output.
|
||||
They are short enough that it's simpler to just repeat them inline for
|
||||
the iteration tests than it is to add a --sort option.
|
||||
|
||||
Reported-by: Randall S. Becker <rsbecker@nexbridge.com>
|
||||
Signed-off-by: Jeff King <peff@peff.net>
|
||||
Signed-off-by: Junio C Hamano <gitster@pobox.com>
|
||||
---
|
||||
t/t0011-hashmap.sh | 58 ++++++++++++++++++++++++++++------------------
|
||||
t/t0016-oidmap.sh | 30 +++++++++++++++---------
|
||||
2 files changed, 55 insertions(+), 33 deletions(-)
|
||||
|
||||
diff --git a/t/t0011-hashmap.sh b/t/t0011-hashmap.sh
|
||||
index 9c96b3e3b10a9..5343ffd3f92c1 100755
|
||||
--- a/t/t0011-hashmap.sh
|
||||
+++ b/t/t0011-hashmap.sh
|
||||
@@ -170,31 +170,45 @@ NULL
|
||||
'
|
||||
|
||||
test_expect_success 'iterate' '
|
||||
-
|
||||
-test_hashmap "put key1 value1
|
||||
-put key2 value2
|
||||
-put fooBarFrotz value3
|
||||
-iterate" "NULL
|
||||
-NULL
|
||||
-NULL
|
||||
-key2 value2
|
||||
-key1 value1
|
||||
-fooBarFrotz value3"
|
||||
-
|
||||
+ test-tool hashmap >actual.raw <<-\EOF &&
|
||||
+ put key1 value1
|
||||
+ put key2 value2
|
||||
+ put fooBarFrotz value3
|
||||
+ iterate
|
||||
+ EOF
|
||||
+
|
||||
+ cat >expect <<-\EOF &&
|
||||
+ NULL
|
||||
+ NULL
|
||||
+ NULL
|
||||
+ fooBarFrotz value3
|
||||
+ key1 value1
|
||||
+ key2 value2
|
||||
+ EOF
|
||||
+
|
||||
+ sort <actual.raw >actual &&
|
||||
+ test_cmp expect actual
|
||||
'
|
||||
|
||||
test_expect_success 'iterate (case insensitive)' '
|
||||
-
|
||||
-test_hashmap "put key1 value1
|
||||
-put key2 value2
|
||||
-put fooBarFrotz value3
|
||||
-iterate" "NULL
|
||||
-NULL
|
||||
-NULL
|
||||
-fooBarFrotz value3
|
||||
-key2 value2
|
||||
-key1 value1" ignorecase
|
||||
-
|
||||
+ test-tool hashmap ignorecase >actual.raw <<-\EOF &&
|
||||
+ put key1 value1
|
||||
+ put key2 value2
|
||||
+ put fooBarFrotz value3
|
||||
+ iterate
|
||||
+ EOF
|
||||
+
|
||||
+ cat >expect <<-\EOF &&
|
||||
+ NULL
|
||||
+ NULL
|
||||
+ NULL
|
||||
+ fooBarFrotz value3
|
||||
+ key1 value1
|
||||
+ key2 value2
|
||||
+ EOF
|
||||
+
|
||||
+ sort <actual.raw >actual &&
|
||||
+ test_cmp expect actual
|
||||
'
|
||||
|
||||
test_expect_success 'grow / shrink' '
|
||||
diff --git a/t/t0016-oidmap.sh b/t/t0016-oidmap.sh
|
||||
index bbe719e950968..31f8276ba82ba 100755
|
||||
--- a/t/t0016-oidmap.sh
|
||||
+++ b/t/t0016-oidmap.sh
|
||||
@@ -86,17 +86,25 @@ NULL"
|
||||
'
|
||||
|
||||
test_expect_success 'iterate' '
|
||||
-
|
||||
-test_oidmap "put one 1
|
||||
-put two 2
|
||||
-put three 3
|
||||
-iterate" "NULL
|
||||
-NULL
|
||||
-NULL
|
||||
-$(git rev-parse two) 2
|
||||
-$(git rev-parse one) 1
|
||||
-$(git rev-parse three) 3"
|
||||
-
|
||||
+ test-tool oidmap >actual.raw <<-\EOF &&
|
||||
+ put one 1
|
||||
+ put two 2
|
||||
+ put three 3
|
||||
+ iterate
|
||||
+ EOF
|
||||
+
|
||||
+ # sort "expect" too so we do not rely on the order of particular oids
|
||||
+ sort >expect <<-EOF &&
|
||||
+ NULL
|
||||
+ NULL
|
||||
+ NULL
|
||||
+ $(git rev-parse one) 1
|
||||
+ $(git rev-parse two) 2
|
||||
+ $(git rev-parse three) 3
|
||||
+ EOF
|
||||
+
|
||||
+ sort <actual.raw >actual &&
|
||||
+ test_cmp expect actual
|
||||
'
|
||||
|
||||
test_done
|
21
git.spec
21
git.spec
@ -84,11 +84,11 @@
|
||||
%endif
|
||||
|
||||
# Define for release candidates
|
||||
#global rcrev .rc0
|
||||
%global rcrev .rc0
|
||||
|
||||
Name: git
|
||||
Version: 2.22.0
|
||||
Release: 2%{?rcrev}%{?dist}
|
||||
Version: 2.23.0
|
||||
Release: 0.0%{?rcrev}%{?dist}
|
||||
Summary: Fast Version Control System
|
||||
License: GPLv2
|
||||
URL: https://git-scm.com/
|
||||
@ -120,10 +120,10 @@ Source99: print-failed-test-output
|
||||
# https://bugzilla.redhat.com/490602
|
||||
Patch0: git-cvsimport-Ignore-cvsps-2.2b1-Branches-output.patch
|
||||
|
||||
# Don't cache completion results if --git-completion-helper fails
|
||||
# https://public-inbox.org/git/20190612085606.12144-1-pclouds@gmail.com/
|
||||
# https://github.com/gitster/git/commit/69702523a.patch
|
||||
Patch1: 0001-completion-do-not-cache-if-git-completion-helper-fai.patch
|
||||
# Fix t0016-oidmap test failure on s390x
|
||||
# https://github.com/gitster/git/commit/e1e7a77141.patch
|
||||
# https://public-inbox.org/git/20190731012336.GA13880@sigill.intra.peff.net/
|
||||
Patch1: 0001-t-sort-output-of-hashmap-iteration.patch
|
||||
|
||||
%if %{with docs}
|
||||
# pod2man is needed to build Git.3pm
|
||||
@ -816,9 +816,9 @@ GIT_SKIP_TESTS=""
|
||||
#
|
||||
# The following 2 tests use run_with_limited_cmdline, which calls ulimit -s 128
|
||||
# to limit the maximum stack size.
|
||||
# t5541.33 'push 2000 tags over http'
|
||||
# t5541.34 'push 2000 tags over http'
|
||||
# t5551.25 'clone the 2,000 tag repo to check OS command line overflow'
|
||||
GIT_SKIP_TESTS="$GIT_SKIP_TESTS t5541.33 t5551.25"
|
||||
GIT_SKIP_TESTS="$GIT_SKIP_TESTS t5541.34 t5551.25"
|
||||
%endif
|
||||
# endif aarch64 %%{arm} %%{power64}
|
||||
|
||||
@ -1018,6 +1018,9 @@ rmdir --ignore-fail-on-non-empty "$testdir"
|
||||
%{?with_docs:%{_pkgdocdir}/git-svn.html}
|
||||
|
||||
%changelog
|
||||
* Mon Jul 29 2019 Todd Zullinger <tmz@pobox.com> - 2.23.0-0.0.rc0
|
||||
- Update to 2.23.0-rc0
|
||||
|
||||
* Thu Jul 25 2019 Todd Zullinger <tmz@pobox.com> - 2.22.0-2
|
||||
- completion: do not cache if --git-completion-helper fails
|
||||
- avoid trailing comments in spec file
|
||||
|
4
sources
4
sources
@ -1,2 +1,2 @@
|
||||
SHA512 (git-2.22.0.tar.xz) = 75b3dcac36f80281effcd099944de34050a35f3599ce42f86ce60455b6c952039fb0f6438d296e0cc9c0651d4a17f467780dc475669227d3c98ddefe91723d42
|
||||
SHA512 (git-2.22.0.tar.sign) = e6834bbe486c0374ce2de7a5922ee0c040153405e8dc03c677f29fde4bb8c3aff04549055ad122657e5bb0c7308544eca3530be9024dd891c4986d179ac53eb0
|
||||
SHA512 (git-2.23.0.rc0.tar.xz) = 909d7de2210d754587840759455a0b8d04397ad510fee1009adf5910e89c763ae7434899cb24914d87b07b73ed26c74c5031f6f7df04f7eaacdd105958b8c665
|
||||
SHA512 (git-2.23.0.rc0.tar.sign) = 5739a9fe7d6435f620d542a7569bea1ebfc671570b18ce598f35548093cb453b0a1af9e73b92efcef2648d7c3755c922f7ad3ca4399db5174aebac4ee813a936
|
||||
|
Loading…
Reference in New Issue
Block a user