Gentoo Archives: gentoo-commits

From: "Michał Górny" <mgorny@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-libs/libgit2/files/, dev-libs/libgit2/
Date: Sat, 28 May 2022 05:36:36
Message-Id: 1653716187.62b8f6febfd78798a960c68a2173c0fba893f0f4.mgorny@gentoo
1 commit: 62b8f6febfd78798a960c68a2173c0fba893f0f4
2 Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
3 AuthorDate: Sat May 28 05:29:49 2022 +0000
4 Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
5 CommitDate: Sat May 28 05:36:27 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=62b8f6fe
7
8 dev-libs/libgit2: Fix test regression due to time passing
9
10 Closes: https://bugs.gentoo.org/847835
11 Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>
12
13 dev-libs/libgit2/files/libgit2-1.4.3-test.patch | 30 +++++++++++++++++++++++++
14 dev-libs/libgit2/libgit2-1.4.3.ebuild | 4 ++++
15 2 files changed, 34 insertions(+)
16
17 diff --git a/dev-libs/libgit2/files/libgit2-1.4.3-test.patch b/dev-libs/libgit2/files/libgit2-1.4.3-test.patch
18 new file mode 100644
19 index 000000000000..23349e6307ef
20 --- /dev/null
21 +++ b/dev-libs/libgit2/files/libgit2-1.4.3-test.patch
22 @@ -0,0 +1,30 @@
23 +From c013fca6b091e36805659ebb26ccaaffae8806dc Mon Sep 17 00:00:00 2001
24 +From: =?UTF-8?q?Carlos=20Mart=C3=ADn=20Nieto?= <carlosmn@××××××.com>
25 +Date: Tue, 3 May 2022 09:28:43 +0200
26 +Subject: [PATCH] revparse: adjust reflog test as we move away from the dates
27 +
28 +The dates we use in `refs::revparse::date` has just passed the ten years, so
29 +now everything is beyond ten years, leading to an unexpected commit being
30 +returned.
31 +
32 +Adjust it to 11 years so it all looks fine again.
33 +---
34 + tests/refs/revparse.c | 2 +-
35 + 1 file changed, 1 insertion(+), 1 deletion(-)
36 +
37 +diff --git a/tests/refs/revparse.c b/tests/refs/revparse.c
38 +index 0bd2ae5bc..93d7ce6db 100644
39 +--- a/tests/refs/revparse.c
40 ++++ b/tests/refs/revparse.c
41 +@@ -399,7 +399,7 @@ void test_refs_revparse__date(void)
42 + * a65fedf HEAD@{1335806603 -0900}: commit:
43 + * be3563a HEAD@{1335806563 -0700}: clone: from /Users/ben/src/libgit2/tests/resour
44 + */
45 +- test_object("HEAD@{10 years ago}", "be3563ae3f795b2b4353bcce3a527ad0a4f7f644");
46 ++ test_object("HEAD@{11 years ago}", "be3563ae3f795b2b4353bcce3a527ad0a4f7f644");
47 +
48 + test_object("HEAD@{1 second}", "a65fedf39aefe402d3bb6e24df4d4f5fe4547750");
49 + test_object("HEAD@{1 second ago}", "a65fedf39aefe402d3bb6e24df4d4f5fe4547750");
50 +--
51 +2.35.1
52 +
53
54 diff --git a/dev-libs/libgit2/libgit2-1.4.3.ebuild b/dev-libs/libgit2/libgit2-1.4.3.ebuild
55 index bc04415f6bc1..15e6de4156f8 100644
56 --- a/dev-libs/libgit2/libgit2-1.4.3.ebuild
57 +++ b/dev-libs/libgit2/libgit2-1.4.3.ebuild
58 @@ -35,6 +35,10 @@ BDEPEND="
59 virtual/pkgconfig
60 "
61
62 +PATCHES=(
63 + "${FILESDIR}"/${P}-test.patch
64 +)
65 +
66 src_prepare() {
67 cmake_src_prepare
68 # relying on forked http-parser to support some obscure URI form