From e4b60c52ef4c51499a5b90b6c856a30344a89e43 Mon Sep 17 00:00:00 2001 From: Todd Zullinger Date: Sat, 27 Mar 2021 00:20:43 -0400 Subject: [PATCH] update to 2.31.1 Release notes: https://github.com/git/git/raw/v2.31.1/Documentation/RelNotes/2.31.1.txt --- ...isect-peel-annotated-tags-to-commits.patch | 83 ------------------- git.spec | 10 +-- sources | 4 +- 3 files changed, 7 insertions(+), 90 deletions(-) delete mode 100644 0001-bisect-peel-annotated-tags-to-commits.patch diff --git a/0001-bisect-peel-annotated-tags-to-commits.patch b/0001-bisect-peel-annotated-tags-to-commits.patch deleted file mode 100644 index 447c6fe..0000000 --- a/0001-bisect-peel-annotated-tags-to-commits.patch +++ /dev/null @@ -1,83 +0,0 @@ -From 7730f85594d4595605934e39d1d816ab663d8fa8 Mon Sep 17 00:00:00 2001 -From: Jeff King -Date: Tue, 16 Mar 2021 11:15:55 -0400 -Subject: [PATCH] bisect: peel annotated tags to commits - -This patch fixes a bug where git-bisect doesn't handle receiving -annotated tags as "git bisect good ", etc. It's a regression in -27257bc466 (bisect--helper: reimplement `bisect_state` & `bisect_head` -shell functions in C, 2020-10-15). - -The original shell code called: - - sha=$(git rev-parse --verify "$rev^{commit}") || - die "$(eval_gettext "Bad rev input: \$rev")" - -which will peel the input to a commit (or complain if that's not -possible). But the C code just calls get_oid(), which will yield the oid -of the tag. - -The fix is to peel to a commit. The error message here is a little -non-idiomatic for Git (since it starts with a capital). I've mostly left -it, as it matches the other converted messages (like the "Bad rev input" -we print when get_oid() fails), though I did add an indication that it -was the peeling that was the problem. It might be worth taking a pass -through this converted code to modernize some of the error messages. - -Note also that the test does a bare "grep" (not i18ngrep) on the -expected "X is the first bad commit" output message. This matches the -rest of the test script. - -Signed-off-by: Jeff King -Signed-off-by: Junio C Hamano ---- - builtin/bisect--helper.c | 9 ++++++++- - t/t6030-bisect-porcelain.sh | 12 ++++++++++++ - 2 files changed, 20 insertions(+), 1 deletion(-) - -diff --git a/builtin/bisect--helper.c b/builtin/bisect--helper.c -index 709eb713a3ba4..81569530e4f08 100644 ---- a/builtin/bisect--helper.c -+++ b/builtin/bisect--helper.c -@@ -875,12 +875,19 @@ static enum bisect_error bisect_state(struct bisect_terms *terms, const char **a - */ - - for (; argc; argc--, argv++) { -+ struct commit *commit; -+ - if (get_oid(*argv, &oid)){ - error(_("Bad rev input: %s"), *argv); - oid_array_clear(&revs); - return BISECT_FAILED; - } -- oid_array_append(&revs, &oid); -+ -+ commit = lookup_commit_reference(the_repository, &oid); -+ if (!commit) -+ die(_("Bad rev input (not a commit): %s"), *argv); -+ -+ oid_array_append(&revs, &commit->object.oid); - } - - if (strbuf_read_file(&buf, git_path_bisect_expected_rev(), 0) < the_hash_algo->hexsz || -diff --git a/t/t6030-bisect-porcelain.sh b/t/t6030-bisect-porcelain.sh -index 52614eefc7e76..9abcee05548d3 100755 ---- a/t/t6030-bisect-porcelain.sh -+++ b/t/t6030-bisect-porcelain.sh -@@ -936,4 +936,16 @@ test_expect_success 'git bisect reset cleans bisection state properly' ' - test_path_is_missing ".git/BISECT_START" - ' - -+test_expect_success 'bisect handles annotated tags' ' -+ test_commit commit-one && -+ git tag -m foo tag-one && -+ test_commit commit-two && -+ git tag -m foo tag-two && -+ git bisect start && -+ git bisect good tag-one && -+ git bisect bad tag-two >output && -+ bad=$(git rev-parse --verify tag-two^{commit}) && -+ grep "$bad is the first bad commit" output -+' -+ - test_done diff --git a/git.spec b/git.spec index c6414a9..6aba386 100644 --- a/git.spec +++ b/git.spec @@ -96,8 +96,8 @@ #global rcrev .rc0 Name: git -Version: 2.31.0 -Release: 2%{?rcrev}%{?dist} +Version: 2.31.1 +Release: 1%{?rcrev}%{?dist} Summary: Fast Version Control System License: GPLv2 URL: https://git-scm.com/ @@ -129,9 +129,6 @@ Source99: print-failed-test-output # https://bugzilla.redhat.com/490602 Patch0: git-cvsimport-Ignore-cvsps-2.2b1-Branches-output.patch -# https://lore.kernel.org/git/878s6nz1sg.fsf@igel.home/ -Patch1: https://github.com/git/git/commit/7730f85594.patch#/0001-bisect-peel-annotated-tags-to-commits.patch - %if %{with docs} # pod2man is needed to build Git.3pm BuildRequires: %{_bindir}/pod2man @@ -1073,6 +1070,9 @@ rmdir --ignore-fail-on-non-empty "$testdir" %{?with_docs:%{_pkgdocdir}/git-svn.html} %changelog +* Sat Mar 27 2021 Todd Zullinger - 2.31.1-1 +- update to 2.31.1 + * Fri Mar 19 2021 Todd Zullinger - 2.31.0-2 - fix git bisect with annotaged tags diff --git a/sources b/sources index 043f8c9..c9311bd 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (git-2.31.0.tar.xz) = b8f7608d4349c983c426494227b0ec9d032e67c775382a32675418f629f365817ac99a61c24e3a380bc5eb65351058dbf55d526890055acf58ad4f028022f513 -SHA512 (git-2.31.0.tar.sign) = 228cce4cc4d43d83fae68ff93d5d77b0601779756812c8eaa374c39ac2a5757bdeea4b5ce9950c4bb9661d09fee88f5d73c309f74a1728e66d1eeeec341295e0 +SHA512 (git-2.31.1.tar.xz) = 9aa334a3e8519700ff5d112153ec42677722980094caa9d22aa91afdb65166bd9a98fa445c0d327c428ebfa73bf4832e9b3836109a1d9319feafe3191cfd170e +SHA512 (git-2.31.1.tar.sign) = 0a721876f9869d1dc9a43e7f83f8e63a3d8fa932ff2d2e69bb98f3e314e2e9a896c2171cb6a020d6c6e929fdf1af736dbeb3f25f93fb4d359a9aaa5b859069c3