Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 99b5d34

Browse files
committed
Upgrade libgit2 to v0.25.0
rebase patches fixes #19793
1 parent f372733 commit 99b5d34

File tree

8 files changed

+15
-40
lines changed

8 files changed

+15
-40
lines changed

deps/checksums/libgit2-428e18f8d4765b8ad6cf4022080a81ab16f6fdc4.tar.gz/md5

Lines changed: 0 additions & 1 deletion
This file was deleted.

deps/checksums/libgit2-428e18f8d4765b8ad6cf4022080a81ab16f6fdc4.tar.gz/sha512

Lines changed: 0 additions & 1 deletion
This file was deleted.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
43f28f86c884c3c469ce4080de287ee7
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
6d7c5a6fd0f6678944e0ae379f5b5fa628f7a6936db6fbff4442e98db7037fd3baf2010ffc7c45ed7a30c7ebff1973a0a9047d67dbac1dedf2df444a80bdf43b

deps/libgit2.version

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
LIBGIT2_BRANCH=v0.24.5
2-
LIBGIT2_SHA1=428e18f8d4765b8ad6cf4022080a81ab16f6fdc4
1+
LIBGIT2_BRANCH=v0.25.0
2+
LIBGIT2_SHA1=75db289a041b1f1084768244e167b953ac7eeaa5

deps/patches/libgit2-agent-nonfatal.patch

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ index cfd5736..82d2c63 100644
1616
+ if (rc != LIBSSH2_ERROR_NONE) {
1717
+ rc = LIBSSH2_ERROR_AUTHENTICATION_FAILED;
1818
goto shutdown;
19-
+ }
19+
+ }
2020

2121
rc = libssh2_agent_list_identities(agent);
22+

deps/patches/libgit2-mbedtls.patch

Lines changed: 8 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
diff --git a/CMakeLists.txt b/CMakeLists.txt
2-
index 0f9cff5..a345636 100644
2+
index 4e1104f..8110489 100644
33
--- a/CMakeLists.txt
44
+++ b/CMakeLists.txt
5-
@@ -112,6 +112,10 @@ IF (HAVE_STRUCT_STAT_NSEC OR WIN32)
6-
OPTION( USE_NSEC "Care about sub-second file mtimes and ctimes" OFF )
5+
@@ -113,6 +113,10 @@ IF (HAVE_STRUCT_STAT_NSEC OR WIN32)
6+
OPTION( USE_NSEC "Care about sub-second file mtimes and ctimes" ON )
77
ENDIF()
88

99
+IF (NOT USE_OPENSSL)
@@ -126,13 +126,13 @@ index 0000000..2f4adbc
126126
+ MBEDCRYPTO_LIBRARY
127127
+)
128128
diff --git a/src/global.c b/src/global.c
129-
index 198bc1e..969b9b9 100644
129+
index e2ad8fe..c5b4269 100644
130130
--- a/src/global.c
131131
+++ b/src/global.c
132-
@@ -9,7 +9,11 @@
133-
#include "hash.h"
132+
@@ -10,7 +10,11 @@
134133
#include "sysdir.h"
135134
#include "filter.h"
135+
#include "merge_driver.h"
136136
+#ifdef GIT_OPENSSL
137137
#include "openssl_stream.h"
138138
+#elif GIT_MBEDTLS
@@ -141,10 +141,10 @@ index 198bc1e..969b9b9 100644
141141
#include "thread-utils.h"
142142
#include "git2/global.h"
143143
#include "transports/ssh.h"
144-
@@ -59,8 +63,13 @@ static int init_common(void)
145-
if ((ret = git_hash_global_init()) == 0 &&
144+
@@ -61,8 +65,13 @@ static int init_common(void)
146145
(ret = git_sysdir_global_init()) == 0 &&
147146
(ret = git_filter_global_init()) == 0 &&
147+
(ret = git_merge_driver_global_init()) == 0 &&
148148
- (ret = git_transport_ssh_global_init()) == 0 &&
149149
- (ret = git_openssl_stream_global_init()) == 0)
150150
+ (ret = git_transport_ssh_global_init()) == 0
@@ -850,32 +850,6 @@ index 83e2d06..6fb538f 100644
850850
#else
851851
GIT_UNUSED(out);
852852
GIT_UNUSED(host);
853-
diff --git a/src/transport.c b/src/transport.c
854-
index 327052f..a438459 100644
855-
--- a/src/transport.c
856-
+++ b/src/transport.c
857-
@@ -29,7 +29,7 @@ static transport_definition local_transport_definition = { "file://", git_transp
858-
static transport_definition transports[] = {
859-
{ "git://", git_transport_smart, &git_subtransport_definition },
860-
{ "http://", git_transport_smart, &http_subtransport_definition },
861-
-#if defined(GIT_OPENSSL) || defined(GIT_WINHTTP) || defined(GIT_SECURE_TRANSPORT)
862-
+#if defined(GIT_OPENSSL) || defined(GIT_WINHTTP) || defined(GIT_SECURE_TRANSPORT) || defined(GIT_MBEDTLS)
863-
{ "https://", git_transport_smart, &http_subtransport_definition },
864-
#endif
865-
{ "file://", git_transport_local, NULL },
866-
diff --git a/src/transports/http.c b/src/transports/http.c
867-
index f0efd95..5cd7484 100644
868-
--- a/src/transports/http.c
869-
+++ b/src/transports/http.c
870-
@@ -598,7 +598,7 @@ static int http_connect(http_subtransport *t)
871-
872-
error = git_stream_connect(t->io);
873-
874-
-#if defined(GIT_OPENSSL) || defined(GIT_SECURE_TRANSPORT) || defined(GIT_CURL)
875-
+#if defined(GIT_OPENSSL) || defined(GIT_SECURE_TRANSPORT) || defined(GIT_CURL) || defined(GIT_MBEDTLS)
876-
if ((!error || error == GIT_ECERTIFICATE) && t->owner->certificate_check_cb != NULL &&
877-
git_stream_is_encrypted(t->io)) {
878-
git_cert *cert;
879853
diff --git a/tests/core/stream.c b/tests/core/stream.c
880854
index 0cbf442..a4fa2b4 100644
881855
--- a/tests/core/stream.c

deps/patches/libgit2-ssh.patch

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
+ GET_TARGET_PROPERTY(LIBSSH2_INCLUDE_DIRS Libssh2::libssh2 INTERFACE_INCLUDE_DIRECTORIES)
1010
+ GET_TARGET_PROPERTY(LIBSSH2_LOCATION Libssh2::libssh2 IMPORTED_LOCATION_RELEASE)
1111
+ GET_FILENAME_COMPONENT(LIBSSH2_LIBRARY_DIRS ${LIBSSH2_LOCATION} PATH)
12-
+ SET(LIBSSH2_LIBRARIES "-lssh2")
12+
+ SET(LIBSSH2_LIBRARIES "-lssh2")
1313
ENDIF()
1414
-IF (LIBSSH2_FOUND)
1515
+IF (Libssh2_FOUND)

0 commit comments

Comments
 (0)