You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
38 lines
1.7 KiB
38 lines
1.7 KiB
3 years ago
|
From c40964b5c2a313a88588bd1be3abe72267bba44b 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.
|
||
|
|
||
|
(cherry picked from commit 7f53d7b600a838c19276e835fd0188c361a63801)
|
||
|
Signed-off-by: Nils Philippsen <nils@redhat.com>
|
||
|
---
|
||
|
tests/refs/revparse.c | 2 --
|
||
|
1 file changed, 2 deletions(-)
|
||
|
|
||
|
diff --git a/tests/refs/revparse.c b/tests/refs/revparse.c
|
||
|
index bc6e0a4c4..a8b2efe6a 100644
|
||
|
--- a/tests/refs/revparse.c
|
||
|
+++ b/tests/refs/revparse.c
|
||
|
@@ -400,8 +400,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");
|
||
|
--
|
||
|
2.36.1
|
||
|
|