From 392736b6071c9f36af5f3a2d242215f164c3b69f Mon Sep 17 00:00:00 2001 From: Igor Raits Date: Sun, 20 Feb 2022 17:55:34 +0100 Subject: [PATCH 2/9] Update to 1.4.1 Signed-off-by: Igor Raits --- .gitignore | 1 + ...oving-untracked-files-by-path-in-sub.patch | 76 ------------------- libgit2.spec | 10 +-- sources | 2 +- 4 files changed, 6 insertions(+), 83 deletions(-) delete mode 100644 0001-checkout-Fix-removing-untracked-files-by-path-in-sub.patch diff --git a/.gitignore b/.gitignore index 3357f5f..21426e9 100644 --- a/.gitignore +++ b/.gitignore @@ -38,3 +38,4 @@ /libgit2-1.0.1.tar.gz /libgit2-1.1.0.tar.gz /libgit2-1.3.0.tar.gz +/libgit2-1.4.1.tar.gz diff --git a/0001-checkout-Fix-removing-untracked-files-by-path-in-sub.patch b/0001-checkout-Fix-removing-untracked-files-by-path-in-sub.patch deleted file mode 100644 index 652da3d..0000000 --- a/0001-checkout-Fix-removing-untracked-files-by-path-in-sub.patch +++ /dev/null @@ -1,76 +0,0 @@ -From d62e44cb8218840a0291fb5fbb7c5106e1e35a12 Mon Sep 17 00:00:00 2001 -From: Segev Finer -Date: Mon, 3 Jun 2019 18:35:08 +0300 -Subject: [PATCH] checkout: Fix removing untracked files by path in - subdirectories - -The checkout code didn't iterate into a subdir if it didn't match the -pathspec, but since the pathspec might match files in the subdir we -should recurse into it (In contrast to gitignore handling). - -Fixes #5089 ---- - src/checkout.c | 9 +++++++-- - tests/checkout/head.c | 26 ++++++++++++++++++++++++++ - 2 files changed, 33 insertions(+), 2 deletions(-) - -diff --git a/src/checkout.c b/src/checkout.c -index f0dd736dc..59ff873dd 100644 ---- a/src/checkout.c -+++ b/src/checkout.c -@@ -371,8 +371,13 @@ static int checkout_action_wd_only( - if (!git_pathspec__match( - pathspec, wd->path, - (data->strategy & GIT_CHECKOUT_DISABLE_PATHSPEC_MATCH) != 0, -- git_iterator_ignore_case(workdir), NULL, NULL)) -- return git_iterator_advance(wditem, workdir); -+ git_iterator_ignore_case(workdir), NULL, NULL)) { -+ -+ if (wd->mode == GIT_FILEMODE_TREE) -+ return git_iterator_advance_into(wditem, workdir); -+ else -+ return git_iterator_advance(wditem, workdir); -+ } - - /* check if item is tracked in the index but not in the checkout diff */ - if (data->index != NULL) { -diff --git a/tests/checkout/head.c b/tests/checkout/head.c -index 799123086..5b3a034e7 100644 ---- a/tests/checkout/head.c -+++ b/tests/checkout/head.c -@@ -109,6 +109,32 @@ void test_checkout_head__do_not_remove_untracked_file_in_subdir(void) - cl_assert(git_path_isfile("testrepo/tracked/subdir/untracked")); - } - -+void test_checkout_head__do_remove_untracked_paths(void) -+{ -+ git_checkout_options opts = GIT_CHECKOUT_OPTIONS_INIT; -+ git_index *index; -+ char *paths[] = {"tracked/untracked"}; -+ -+ cl_git_pass(p_mkdir("testrepo/tracked", 0755)); -+ cl_git_pass(p_mkdir("testrepo/tracked/subdir", 0755)); -+ cl_git_mkfile("testrepo/tracked/tracked", "tracked\n"); -+ cl_git_mkfile("testrepo/tracked/untracked", "untracked\n"); -+ -+ cl_git_pass(git_repository_index(&index, g_repo)); -+ cl_git_pass(git_index_add_bypath(index, "tracked/tracked")); -+ cl_git_pass(git_index_write(index)); -+ -+ git_index_free(index); -+ -+ opts.checkout_strategy = GIT_CHECKOUT_FORCE | GIT_CHECKOUT_REMOVE_UNTRACKED; -+ opts.paths.strings = paths; -+ opts.paths.count = 1; -+ cl_git_pass(git_checkout_head(g_repo, &opts)); -+ -+ cl_assert(git_path_isfile("testrepo/tracked/tracked")); -+ cl_assert(!git_path_isfile("testrepo/tracked/untracked")); -+} -+ - void test_checkout_head__do_remove_tracked_subdir(void) - { - git_checkout_options opts = GIT_CHECKOUT_OPTIONS_INIT; --- -2.27.0 - diff --git a/libgit2.spec b/libgit2.spec index 643a58b..122f3a9 100644 --- a/libgit2.spec +++ b/libgit2.spec @@ -6,7 +6,7 @@ %endif Name: libgit2 -Version: 1.3.0 +Version: 1.4.1 Release: %autorelease Summary: C implementation of the Git core methods as a library with a solid API License: GPLv2 with exceptions @@ -63,24 +63,22 @@ rm -vr deps -DUSE_SHA1=HTTPS \ -DUSE_HTTPS=OpenSSL \ -DUSE_NTLMCLIENT=OFF \ -%if %{without libssh2} - -DUSE_SSH=OFF \ -%endif + -DUSE_SSH=%[0%{?with_libssh2} ? "ON" : "OFF"] \ %{nil} %cmake_build %install %cmake_install # Include previous ABI version for temporary binary compatibility -cp -a %{_libdir}/libgit2.so.1.1* %{buildroot}%{_libdir} +cp -a %{_libdir}/libgit2.so.1.3* %{buildroot}%{_libdir} %check %ctest %files %license COPYING +%{_libdir}/libgit2.so.1.4* %{_libdir}/libgit2.so.1.3* -%{_libdir}/libgit2.so.1.1* %files devel %doc AUTHORS docs examples README.md diff --git a/sources b/sources index 2b5d127..295cfb4 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (libgit2-1.3.0.tar.gz) = 842a648a67ff23ba9e6bf14b706ba9081164866e14000ebf3858442b7046925f05e1dbf00a7d740dc4bf32280e260730e23a9492e817094aa90736ae335ee76e +SHA512 (libgit2-1.4.1.tar.gz) = 66943d82811c5e24687231696bd1ce8d7d58f44081c00a7030e01a69a7c920605a427c315a26af6c57c9bd7c1d1d31ab857f80615fce1ba4b981d01f733215cd From 8efee64ae4c221c2a63721c650fdf7f0db83f43e Mon Sep 17 00:00:00 2001 From: Igor Raits Date: Sat, 19 Mar 2022 21:46:29 +0100 Subject: [PATCH 3/9] Revert "Update to 1.4.1" This reverts commit 392736b6071c9f36af5f3a2d242215f164c3b69f. Signed-off-by: Igor Raits --- .gitignore | 1 - ...oving-untracked-files-by-path-in-sub.patch | 76 +++++++++++++++++++ libgit2.spec | 10 ++- sources | 2 +- 4 files changed, 83 insertions(+), 6 deletions(-) create mode 100644 0001-checkout-Fix-removing-untracked-files-by-path-in-sub.patch diff --git a/.gitignore b/.gitignore index 21426e9..3357f5f 100644 --- a/.gitignore +++ b/.gitignore @@ -38,4 +38,3 @@ /libgit2-1.0.1.tar.gz /libgit2-1.1.0.tar.gz /libgit2-1.3.0.tar.gz -/libgit2-1.4.1.tar.gz diff --git a/0001-checkout-Fix-removing-untracked-files-by-path-in-sub.patch b/0001-checkout-Fix-removing-untracked-files-by-path-in-sub.patch new file mode 100644 index 0000000..652da3d --- /dev/null +++ b/0001-checkout-Fix-removing-untracked-files-by-path-in-sub.patch @@ -0,0 +1,76 @@ +From d62e44cb8218840a0291fb5fbb7c5106e1e35a12 Mon Sep 17 00:00:00 2001 +From: Segev Finer +Date: Mon, 3 Jun 2019 18:35:08 +0300 +Subject: [PATCH] checkout: Fix removing untracked files by path in + subdirectories + +The checkout code didn't iterate into a subdir if it didn't match the +pathspec, but since the pathspec might match files in the subdir we +should recurse into it (In contrast to gitignore handling). + +Fixes #5089 +--- + src/checkout.c | 9 +++++++-- + tests/checkout/head.c | 26 ++++++++++++++++++++++++++ + 2 files changed, 33 insertions(+), 2 deletions(-) + +diff --git a/src/checkout.c b/src/checkout.c +index f0dd736dc..59ff873dd 100644 +--- a/src/checkout.c ++++ b/src/checkout.c +@@ -371,8 +371,13 @@ static int checkout_action_wd_only( + if (!git_pathspec__match( + pathspec, wd->path, + (data->strategy & GIT_CHECKOUT_DISABLE_PATHSPEC_MATCH) != 0, +- git_iterator_ignore_case(workdir), NULL, NULL)) +- return git_iterator_advance(wditem, workdir); ++ git_iterator_ignore_case(workdir), NULL, NULL)) { ++ ++ if (wd->mode == GIT_FILEMODE_TREE) ++ return git_iterator_advance_into(wditem, workdir); ++ else ++ return git_iterator_advance(wditem, workdir); ++ } + + /* check if item is tracked in the index but not in the checkout diff */ + if (data->index != NULL) { +diff --git a/tests/checkout/head.c b/tests/checkout/head.c +index 799123086..5b3a034e7 100644 +--- a/tests/checkout/head.c ++++ b/tests/checkout/head.c +@@ -109,6 +109,32 @@ void test_checkout_head__do_not_remove_untracked_file_in_subdir(void) + cl_assert(git_path_isfile("testrepo/tracked/subdir/untracked")); + } + ++void test_checkout_head__do_remove_untracked_paths(void) ++{ ++ git_checkout_options opts = GIT_CHECKOUT_OPTIONS_INIT; ++ git_index *index; ++ char *paths[] = {"tracked/untracked"}; ++ ++ cl_git_pass(p_mkdir("testrepo/tracked", 0755)); ++ cl_git_pass(p_mkdir("testrepo/tracked/subdir", 0755)); ++ cl_git_mkfile("testrepo/tracked/tracked", "tracked\n"); ++ cl_git_mkfile("testrepo/tracked/untracked", "untracked\n"); ++ ++ cl_git_pass(git_repository_index(&index, g_repo)); ++ cl_git_pass(git_index_add_bypath(index, "tracked/tracked")); ++ cl_git_pass(git_index_write(index)); ++ ++ git_index_free(index); ++ ++ opts.checkout_strategy = GIT_CHECKOUT_FORCE | GIT_CHECKOUT_REMOVE_UNTRACKED; ++ opts.paths.strings = paths; ++ opts.paths.count = 1; ++ cl_git_pass(git_checkout_head(g_repo, &opts)); ++ ++ cl_assert(git_path_isfile("testrepo/tracked/tracked")); ++ cl_assert(!git_path_isfile("testrepo/tracked/untracked")); ++} ++ + void test_checkout_head__do_remove_tracked_subdir(void) + { + git_checkout_options opts = GIT_CHECKOUT_OPTIONS_INIT; +-- +2.27.0 + diff --git a/libgit2.spec b/libgit2.spec index 122f3a9..643a58b 100644 --- a/libgit2.spec +++ b/libgit2.spec @@ -6,7 +6,7 @@ %endif Name: libgit2 -Version: 1.4.1 +Version: 1.3.0 Release: %autorelease Summary: C implementation of the Git core methods as a library with a solid API License: GPLv2 with exceptions @@ -63,22 +63,24 @@ rm -vr deps -DUSE_SHA1=HTTPS \ -DUSE_HTTPS=OpenSSL \ -DUSE_NTLMCLIENT=OFF \ - -DUSE_SSH=%[0%{?with_libssh2} ? "ON" : "OFF"] \ +%if %{without libssh2} + -DUSE_SSH=OFF \ +%endif %{nil} %cmake_build %install %cmake_install # Include previous ABI version for temporary binary compatibility -cp -a %{_libdir}/libgit2.so.1.3* %{buildroot}%{_libdir} +cp -a %{_libdir}/libgit2.so.1.1* %{buildroot}%{_libdir} %check %ctest %files %license COPYING -%{_libdir}/libgit2.so.1.4* %{_libdir}/libgit2.so.1.3* +%{_libdir}/libgit2.so.1.1* %files devel %doc AUTHORS docs examples README.md diff --git a/sources b/sources index 295cfb4..2b5d127 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (libgit2-1.4.1.tar.gz) = 66943d82811c5e24687231696bd1ce8d7d58f44081c00a7030e01a69a7c920605a427c315a26af6c57c9bd7c1d1d31ab857f80615fce1ba4b981d01f733215cd +SHA512 (libgit2-1.3.0.tar.gz) = 842a648a67ff23ba9e6bf14b706ba9081164866e14000ebf3858442b7046925f05e1dbf00a7d740dc4bf32280e260730e23a9492e817094aa90736ae335ee76e From daa9ab6ab0fa897f0465ef7079510a83c7ed152f Mon Sep 17 00:00:00 2001 From: Nils Philippsen Date: Tue, 5 Jul 2022 17:13:48 +0200 Subject: [PATCH 4/9] Remove obsolete patch Signed-off-by: Nils Philippsen --- ...oving-untracked-files-by-path-in-sub.patch | 76 ------------------- 1 file changed, 76 deletions(-) delete mode 100644 0001-checkout-Fix-removing-untracked-files-by-path-in-sub.patch diff --git a/0001-checkout-Fix-removing-untracked-files-by-path-in-sub.patch b/0001-checkout-Fix-removing-untracked-files-by-path-in-sub.patch deleted file mode 100644 index 652da3d..0000000 --- a/0001-checkout-Fix-removing-untracked-files-by-path-in-sub.patch +++ /dev/null @@ -1,76 +0,0 @@ -From d62e44cb8218840a0291fb5fbb7c5106e1e35a12 Mon Sep 17 00:00:00 2001 -From: Segev Finer -Date: Mon, 3 Jun 2019 18:35:08 +0300 -Subject: [PATCH] checkout: Fix removing untracked files by path in - subdirectories - -The checkout code didn't iterate into a subdir if it didn't match the -pathspec, but since the pathspec might match files in the subdir we -should recurse into it (In contrast to gitignore handling). - -Fixes #5089 ---- - src/checkout.c | 9 +++++++-- - tests/checkout/head.c | 26 ++++++++++++++++++++++++++ - 2 files changed, 33 insertions(+), 2 deletions(-) - -diff --git a/src/checkout.c b/src/checkout.c -index f0dd736dc..59ff873dd 100644 ---- a/src/checkout.c -+++ b/src/checkout.c -@@ -371,8 +371,13 @@ static int checkout_action_wd_only( - if (!git_pathspec__match( - pathspec, wd->path, - (data->strategy & GIT_CHECKOUT_DISABLE_PATHSPEC_MATCH) != 0, -- git_iterator_ignore_case(workdir), NULL, NULL)) -- return git_iterator_advance(wditem, workdir); -+ git_iterator_ignore_case(workdir), NULL, NULL)) { -+ -+ if (wd->mode == GIT_FILEMODE_TREE) -+ return git_iterator_advance_into(wditem, workdir); -+ else -+ return git_iterator_advance(wditem, workdir); -+ } - - /* check if item is tracked in the index but not in the checkout diff */ - if (data->index != NULL) { -diff --git a/tests/checkout/head.c b/tests/checkout/head.c -index 799123086..5b3a034e7 100644 ---- a/tests/checkout/head.c -+++ b/tests/checkout/head.c -@@ -109,6 +109,32 @@ void test_checkout_head__do_not_remove_untracked_file_in_subdir(void) - cl_assert(git_path_isfile("testrepo/tracked/subdir/untracked")); - } - -+void test_checkout_head__do_remove_untracked_paths(void) -+{ -+ git_checkout_options opts = GIT_CHECKOUT_OPTIONS_INIT; -+ git_index *index; -+ char *paths[] = {"tracked/untracked"}; -+ -+ cl_git_pass(p_mkdir("testrepo/tracked", 0755)); -+ cl_git_pass(p_mkdir("testrepo/tracked/subdir", 0755)); -+ cl_git_mkfile("testrepo/tracked/tracked", "tracked\n"); -+ cl_git_mkfile("testrepo/tracked/untracked", "untracked\n"); -+ -+ cl_git_pass(git_repository_index(&index, g_repo)); -+ cl_git_pass(git_index_add_bypath(index, "tracked/tracked")); -+ cl_git_pass(git_index_write(index)); -+ -+ git_index_free(index); -+ -+ opts.checkout_strategy = GIT_CHECKOUT_FORCE | GIT_CHECKOUT_REMOVE_UNTRACKED; -+ opts.paths.strings = paths; -+ opts.paths.count = 1; -+ cl_git_pass(git_checkout_head(g_repo, &opts)); -+ -+ cl_assert(git_path_isfile("testrepo/tracked/tracked")); -+ cl_assert(!git_path_isfile("testrepo/tracked/untracked")); -+} -+ - void test_checkout_head__do_remove_tracked_subdir(void) - { - git_checkout_options opts = GIT_CHECKOUT_OPTIONS_INIT; --- -2.27.0 - From 697696c3820839d5a6dc790b6f15c4658dce255a Mon Sep 17 00:00:00 2001 From: Nils Philippsen Date: Tue, 5 Jul 2022 17:37:45 +0200 Subject: [PATCH 5/9] Remove error-prone redundant test (#2083413) Signed-off-by: Nils Philippsen --- ...se-Remove-error-prone-redundant-test.patch | 37 +++++++++++++++++++ libgit2.spec | 2 + 2 files changed, 39 insertions(+) create mode 100644 0001-revparse-Remove-error-prone-redundant-test.patch diff --git a/0001-revparse-Remove-error-prone-redundant-test.patch b/0001-revparse-Remove-error-prone-redundant-test.patch new file mode 100644 index 0000000..306037c --- /dev/null +++ b/0001-revparse-Remove-error-prone-redundant-test.patch @@ -0,0 +1,37 @@ +From c40964b5c2a313a88588bd1be3abe72267bba44b Mon Sep 17 00:00:00 2001 +From: Carl Dong +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 +--- + 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 + diff --git a/libgit2.spec b/libgit2.spec index 643a58b..13773f9 100644 --- a/libgit2.spec +++ b/libgit2.spec @@ -12,6 +12,8 @@ Summary: C implementation of the Git core methods as a library with a sol License: GPLv2 with exceptions URL: https://libgit2.org/ Source0: https://github.com/libgit2/libgit2/archive/refs/tags/v%{version}.tar.gz#/%{name}-%{version}.tar.gz +# Backported from https://github.com/libgit2/libgit2/pull/6299 +Patch1: 0001-revparse-Remove-error-prone-redundant-test.patch BuildRequires: gcc BuildRequires: cmake >= 3.5.1 From 2a568bde2537c6a50089b0ecd584d515c7dfa6ef Mon Sep 17 00:00:00 2001 From: Nils Philippsen Date: Tue, 5 Jul 2022 17:38:22 +0200 Subject: [PATCH 6/9] Drop pre-built previous ABI version Including pre-built binaries violates Fedora Packaging Guidelines. For details, see: https://docs.fedoraproject.org/en-US/packaging-guidelines/what-can-be-packaged/#prebuilt-binaries-or-libraries Signed-off-by: Nils Philippsen --- libgit2.spec | 4 ---- 1 file changed, 4 deletions(-) diff --git a/libgit2.spec b/libgit2.spec index 13773f9..e247048 100644 --- a/libgit2.spec +++ b/libgit2.spec @@ -27,7 +27,6 @@ BuildRequires: openssl-devel BuildRequires: pcre2-devel BuildRequires: python3 BuildRequires: zlib-devel -BuildRequires: libgit2 Provides: bundled(libxdiff) %description @@ -73,8 +72,6 @@ rm -vr deps %install %cmake_install -# Include previous ABI version for temporary binary compatibility -cp -a %{_libdir}/libgit2.so.1.1* %{buildroot}%{_libdir} %check %ctest @@ -82,7 +79,6 @@ cp -a %{_libdir}/libgit2.so.1.1* %{buildroot}%{_libdir} %files %license COPYING %{_libdir}/libgit2.so.1.3* -%{_libdir}/libgit2.so.1.1* %files devel %doc AUTHORS docs examples README.md From 12486e96a241a897e83240e9de7dc9a9002d9c83 Mon Sep 17 00:00:00 2001 From: Nils Philippsen Date: Tue, 5 Jul 2022 17:55:19 +0200 Subject: [PATCH 7/9] Update to 1.3.1 Signed-off-by: Nils Philippsen --- .gitignore | 1 + libgit2.spec | 2 +- sources | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 3357f5f..5dbc926 100644 --- a/.gitignore +++ b/.gitignore @@ -38,3 +38,4 @@ /libgit2-1.0.1.tar.gz /libgit2-1.1.0.tar.gz /libgit2-1.3.0.tar.gz +/libgit2-1.3.1.tar.gz diff --git a/libgit2.spec b/libgit2.spec index e247048..1ab5638 100644 --- a/libgit2.spec +++ b/libgit2.spec @@ -6,7 +6,7 @@ %endif Name: libgit2 -Version: 1.3.0 +Version: 1.3.1 Release: %autorelease Summary: C implementation of the Git core methods as a library with a solid API License: GPLv2 with exceptions diff --git a/sources b/sources index 2b5d127..5adf26a 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (libgit2-1.3.0.tar.gz) = 842a648a67ff23ba9e6bf14b706ba9081164866e14000ebf3858442b7046925f05e1dbf00a7d740dc4bf32280e260730e23a9492e817094aa90736ae335ee76e +SHA512 (libgit2-1.3.1.tar.gz) = 012ffda7e8b9557923758fdbe68869875977d419bfa60b61f90adadc056600e2b1cc2db1c2a003315ea0e193c0145c1f431054f7bd960c5e6e14fa541e46cba3 From c867fd47ed5595da0c956b508ab9b2fe85191e9f Mon Sep 17 00:00:00 2001 From: Pete Walter Date: Fri, 20 Jan 2023 23:22:40 +0000 Subject: [PATCH 9/9] Update to 1.3.2 (#2160865) --- .gitignore | 1 + ...se-Remove-error-prone-redundant-test.patch | 37 ------------------- libgit2.spec | 4 +- sources | 2 +- 4 files changed, 3 insertions(+), 41 deletions(-) delete mode 100644 0001-revparse-Remove-error-prone-redundant-test.patch diff --git a/.gitignore b/.gitignore index 5dbc926..b7a7f55 100644 --- a/.gitignore +++ b/.gitignore @@ -39,3 +39,4 @@ /libgit2-1.1.0.tar.gz /libgit2-1.3.0.tar.gz /libgit2-1.3.1.tar.gz +/libgit2-1.3.2.tar.gz diff --git a/0001-revparse-Remove-error-prone-redundant-test.patch b/0001-revparse-Remove-error-prone-redundant-test.patch deleted file mode 100644 index 306037c..0000000 --- a/0001-revparse-Remove-error-prone-redundant-test.patch +++ /dev/null @@ -1,37 +0,0 @@ -From c40964b5c2a313a88588bd1be3abe72267bba44b Mon Sep 17 00:00:00 2001 -From: Carl Dong -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 ---- - 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 - diff --git a/libgit2.spec b/libgit2.spec index 1ab5638..0b890d8 100644 --- a/libgit2.spec +++ b/libgit2.spec @@ -6,14 +6,12 @@ %endif Name: libgit2 -Version: 1.3.1 +Version: 1.3.2 Release: %autorelease Summary: C implementation of the Git core methods as a library with a solid API License: GPLv2 with exceptions URL: https://libgit2.org/ Source0: https://github.com/libgit2/libgit2/archive/refs/tags/v%{version}.tar.gz#/%{name}-%{version}.tar.gz -# Backported from https://github.com/libgit2/libgit2/pull/6299 -Patch1: 0001-revparse-Remove-error-prone-redundant-test.patch BuildRequires: gcc BuildRequires: cmake >= 3.5.1 diff --git a/sources b/sources index 5adf26a..ce8535d 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (libgit2-1.3.1.tar.gz) = 012ffda7e8b9557923758fdbe68869875977d419bfa60b61f90adadc056600e2b1cc2db1c2a003315ea0e193c0145c1f431054f7bd960c5e6e14fa541e46cba3 +SHA512 (libgit2-1.3.2.tar.gz) = 580ad6f3e2cb992014d7fecef4d834dd0fda169c4439ec5d566322edb457b2173910b25a49ba50d5bd05518ad771ee2f42e47ab48ce417c297b6a93dd0cb502d