diff --git a/0001-range-diff-avoid-compiler-warning-when-char-is-unsig.patch b/0001-range-diff-avoid-compiler-warning-when-char-is-unsig.patch new file mode 100644 index 0000000..f3a9ab9 --- /dev/null +++ b/0001-range-diff-avoid-compiler-warning-when-char-is-unsig.patch @@ -0,0 +1,40 @@ +From d9165bef5810df216e0eb4fac62d59cbf19446e4 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Ren=C3=A9=20Scharfe?= +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 +Signed-off-by: Junio C Hamano +--- + 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; diff --git a/git.spec b/git.spec index c03c12f..e875ca6 100644 --- a/git.spec +++ b/git.spec @@ -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 - 2.40.0-0.1.rc1 +- update to 2.40.0-rc1 + * Fri Feb 24 2023 Todd Zullinger - 2.40.0-0.0.rc0 - update to 2.40.0-rc0 diff --git a/sources b/sources index 542036e..f222e62 100644 --- a/sources +++ b/sources @@ -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