summaryrefslogtreecommitdiff
path: root/user
diff options
context:
space:
mode:
authorZach van Rijn <me@zv.io>2023-05-03 15:22:09 -0500
committerZach van Rijn <me@zv.io>2023-05-03 15:30:56 -0500
commit5c4f1b44baa4c2c74dd8abeb61bf4bd4df0353db (patch)
tree41fb98134fbc0bad9b599914933e0a1f79cd4bfd /user
parente94cc18f738d320f96e096dae3490589df5cc3a5 (diff)
downloadpackages-5c4f1b44baa4c2c74dd8abeb61bf4bd4df0353db.tar.gz
packages-5c4f1b44baa4c2c74dd8abeb61bf4bd4df0353db.tar.bz2
packages-5c4f1b44baa4c2c74dd8abeb61bf4bd4df0353db.tar.xz
packages-5c4f1b44baa4c2c74dd8abeb61bf4bd4df0353db.zip
user/libgit2: delete broken test. fixes #686 again.
Diffstat (limited to 'user')
-rw-r--r--user/libgit2/APKBUILD4
-rw-r--r--user/libgit2/remove-flaky-revparse-test.patch40
-rw-r--r--user/libgit2/test-fix.patch27
3 files changed, 42 insertions, 29 deletions
diff --git a/user/libgit2/APKBUILD b/user/libgit2/APKBUILD
index 634b9ea9c..5026d5cb3 100644
--- a/user/libgit2/APKBUILD
+++ b/user/libgit2/APKBUILD
@@ -14,7 +14,7 @@ depends_dev="curl-dev libssh2-dev"
makedepends="$depends_dev cmake http-parser-dev openssl-dev python3 zlib-dev"
subpackages="$pkgname-dev"
source="$pkgname-$pkgver.tar.gz::https://github.com/$pkgname/$pkgname/archive/v$pkgver.tar.gz
- test-fix.patch
+ remove-flaky-revparse-test.patch
"
# secfixes:
@@ -49,4 +49,4 @@ package() {
}
sha512sums="abfea885f46444b0304ae57c32c06f4252afb0093c924da5e1ba10aaed952824d1b84036adb79b5b8ad8bea56a6331a51c62f3b9839aead16c7b26cb4554b53a libgit2-0.28.5.tar.gz
-0df17aeec1445cd88a4dc361e6f2c9451e1b547bc6d1d932a245382184a466422bb66be9e1bfc1aab9370de43b2f0c33a102bab710ba8e0fdb7fc8e8bd875546 test-fix.patch"
+ac38da9da307a898e68d5b9c0a77136f82fd873daa13f903e67aa8b7274d781d6d917d97d1affcfd7fd24885ac4b27ab91900446c49f842cc39a9fd39e8ba43e remove-flaky-revparse-test.patch"
diff --git a/user/libgit2/remove-flaky-revparse-test.patch b/user/libgit2/remove-flaky-revparse-test.patch
new file mode 100644
index 000000000..94d6806b8
--- /dev/null
+++ b/user/libgit2/remove-flaky-revparse-test.patch
@@ -0,0 +1,40 @@
+This patch differs from upstream in the following way(s):
+
+ * Changed paths
+
+ * Changed "11 years ago" to "10 years ago" to match state
+ before libgit2 bdab22384cc61d315005a65456a9f9563bb27c8f
+
+ * Changed a commit hash to 'NULL' to match source code
+
+From 7f53d7b600a838c19276e835fd0188c361a63801 Mon Sep 17 00:00:00 2001
+From: Carl Dong <accounts@carldong.me>
+Date: Mon, 9 May 2022 12:09:08 -0400
+Subject: [PATCH] revparse: Remove error-prone, redundant test
+
+Originally introduced in: 776a6a8e5f8e258d31aded73c0ce38df6ac7bdc4
+
+This test case has recently been fixed in bdab22384cc61d315005a65456a9f9563bb27c8f, but that fix will only last for a year. Next year the same problem will crop up and the test will need to be re-edited.
+
+This is not ideal as
+- This test case becomes an unnecessary burden for developers
+- Downstream distros or even just users who want to build older versions of libgit2 are guaranteed to have this test fail
+
+Furthermore, this test case is entirely unnecessary, as the functionality that was originally (see 776a6a8e5f8e258d31aded73c0ce38df6ac7bdc4) intended to be tested is well-covered by subsequent tests which specify a date instead of a "x ago" specification.
+---
+ tests/libgit2/refs/revparse.c | 2 --
+ 1 file changed, 2 deletions(-)
+
+diff --git a/tests/libgit2/refs/revparse.c b/tests/libgit2/refs/revparse.c
+index 93d7ce6db81..56af3c939be 100644
+--- a/tests/refs/revparse.c
++++ b/tests/refs/revparse.c
+@@ -399,8 +399,6 @@ void test_refs_revparse__date(void)
+ * a65fedf HEAD@{1335806603 -0900}: commit:
+ * be3563a HEAD@{1335806563 -0700}: clone: from /Users/ben/src/libgit2/tests/resour
+ */
+- test_object("HEAD@{10 years ago}", NULL);
+-
+ test_object("HEAD@{1 second}", "a65fedf39aefe402d3bb6e24df4d4f5fe4547750");
+ test_object("HEAD@{1 second ago}", "a65fedf39aefe402d3bb6e24df4d4f5fe4547750");
+ test_object("HEAD@{2 days ago}", "a65fedf39aefe402d3bb6e24df4d4f5fe4547750");
diff --git a/user/libgit2/test-fix.patch b/user/libgit2/test-fix.patch
deleted file mode 100644
index a6eed991a..000000000
--- a/user/libgit2/test-fix.patch
+++ /dev/null
@@ -1,27 +0,0 @@
-From bdab22384cc61d315005a65456a9f9563bb27c8f Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Carlos=20Mart=C3=ADn=20Nieto?= <carlosmn@github.com>
-Date: Tue, 3 May 2022 09:28:43 +0200
-Subject: [PATCH] revparse: adjust reflog test as we move away from the dates
-
-The dates we use in `refs::revparse::date` has just passed the ten years, so
-now everything is beyond ten years, leading to an unexpected commit being
-returned.
-
-Adjust it to 11 years so it all looks fine again.
----
- tests/libgit2/refs/revparse.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/tests/libgit2/refs/revparse.c b/tests/libgit2/refs/revparse.c
-index 0bd2ae5bc2c..93d7ce6db81 100644
---- a/tests/refs/revparse.c
-+++ b/tests/refs/revparse.c
-@@ -400,7 +400,7 @@ void test_refs_revparse__date(void)
- * a65fedf HEAD@{1335806603 -0900}: commit:
- * be3563a HEAD@{1335806563 -0700}: clone: from /Users/ben/src/libgit2/tests/resour
- */
-- test_object("HEAD@{10 years ago}", NULL);
-+ test_object("HEAD@{11 years ago}", NULL);
-
- test_object("HEAD@{1 second}", "a65fedf39aefe402d3bb6e24df4d4f5fe4547750");
- test_object("HEAD@{1 second ago}", "a65fedf39aefe402d3bb6e24df4d4f5fe4547750");