update to 2.40.0-rc1

Apply upstream patch to resolve issues in range-diff on non-x86 arches.

Release notes:
https://github.com/git/git/raw/v2.40.0-rc1/Documentation/RelNotes/2.40.0.txt
This commit is contained in:
Todd Zullinger 2023-03-01 13:16:22 -05:00
parent f5940a719d
commit 01d712d89b
3 changed files with 52 additions and 4 deletions

View File

@ -0,0 +1,40 @@
From d9165bef5810df216e0eb4fac62d59cbf19446e4 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Ren=C3=A9=20Scharfe?= <l.s.r@web.de>
Date: Tue, 28 Feb 2023 17:13:27 +0100
Subject: [PATCH] range-diff: avoid compiler warning when char is unsigned
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Since 2b15969f61 (range-diff: let '--abbrev' option takes effect,
2023-02-20), GCC 11.3 on Ubuntu 22.04 on aarch64 warns (and errors
out if the make variable DEVELOPER is set):
range-diff.c: In function output_pair_header:
range-diff.c:388:20: error: comparison is always false due to limited range of data type [-Werror=type-limits]
388 | if (abbrev < 0)
| ^
cc1: all warnings being treated as errors
That's because char is unsigned on that platform. Use int instead, just
like in struct diff_options, to copy the value faithfully.
Signed-off-by: René Scharfe <l.s.r@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
---
range-diff.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/range-diff.c b/range-diff.c
index 086365dffb..4bd65ab749 100644
--- a/range-diff.c
+++ b/range-diff.c
@@ -383,7 +383,7 @@ static void output_pair_header(struct diff_options *diffopt,
const char *color_new = diff_get_color_opt(diffopt, DIFF_FILE_NEW);
const char *color_commit = diff_get_color_opt(diffopt, DIFF_COMMIT);
const char *color;
- char abbrev = diffopt->abbrev;
+ int abbrev = diffopt->abbrev;
if (abbrev < 0)
abbrev = DEFAULT_ABBREV;

View File

@ -74,14 +74,14 @@
%{?!bash_completions_dir:%global bash_completions_dir %{_datadir}/bash-completion/completions}
# Define for release candidates
%global rcrev .rc0
%global rcrev .rc1
# Set path to the package-notes linker script
%global _package_note_file %{_builddir}/%{name}-%{version}%{?rcrev}/.package_note-%{name}-%{version}-%{release}.%{_arch}.ld
Name: git
Version: 2.40.0
Release: 0.0%{?rcrev}%{?dist}
Release: 0.1%{?rcrev}%{?dist}
Summary: Fast Version Control System
License: BSD-3-Clause AND GPL-2.0-only AND GPL-2.0-or-later AND LGPL-2.1-or-later AND MIT
URL: https://git-scm.com/
@ -123,6 +123,11 @@ Patch2: 0002-t-lib-git-daemon-try-harder-to-find-a-port.patch
# https://github.com/tmzullinger/git/commit/aa5105dc11
Patch3: 0003-t-lib-git-svn-try-harder-to-find-a-port.patch
# Avoid range-diff issues on non-x86 arches
# https://github.com/git/git/commit/d9165bef58
# https://lore.kernel.org/git/Y%2F+paI8WGSmEbv%2Fw@pobox.com/
Patch4: 0001-range-diff-avoid-compiler-warning-when-char-is-unsig.patch
%if %{with docs}
# pod2man is needed to build Git.3pm
BuildRequires: %{_bindir}/pod2man
@ -1035,6 +1040,9 @@ rmdir --ignore-fail-on-non-empty "$testdir"
%{?with_docs:%{_pkgdocdir}/git-svn.html}
%changelog
* Wed Mar 01 2023 Todd Zullinger <tmz@pobox.com> - 2.40.0-0.1.rc1
- update to 2.40.0-rc1
* Fri Feb 24 2023 Todd Zullinger <tmz@pobox.com> - 2.40.0-0.0.rc0
- update to 2.40.0-rc0

View File

@ -1,2 +1,2 @@
SHA512 (git-2.40.0.rc0.tar.xz) = 123d400cce9a66f7399fe9e74b79e8ec709b7ca45d4cf8296af27ad1b866fccebc6493cc056c08d4678d3720bace60193d55ff6014137965317c16e65536ac20
SHA512 (git-2.40.0.rc0.tar.sign) = 7a763b0581534b1e019dbf05b3a06def0f9eb73f9eb2fee5022d5fed59147d47ddca586581b754df61cc5c14e022b5b2096e23e0db037cdff1960f412e0b4dec
SHA512 (git-2.40.0.rc1.tar.xz) = edff125736d498d964ec876a30a2bd4b0a115df58747e8f2c94c7c45fb5b112925336fecc7cbb2f2037e9f890d10753e988499be222fc41a176fec68f2a157fc
SHA512 (git-2.40.0.rc1.tar.sign) = aabee9d1810fd93858ad884ae0aaefb5a6965543715e02f8abf787cfc47794f53d6527399787e8aca20ceb9e8b6df4c9d1be2cbbd517ecb11eae3c05e77ffcb5