From df252520cbdef894c850871868271a46d9079188 Mon Sep 17 00:00:00 2001 From: Benjamin Tan Date: Sat, 2 Mar 2024 00:43:48 +0800 Subject: [PATCH] git2-rs: Use prerelease version with OpenSSH support --- Cargo.lock | 21 ++------------------- Cargo.toml | 2 +- lib/src/git.rs | 7 ++++++- 3 files changed, 9 insertions(+), 21 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 68c4089e7b..793501265b 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -919,8 +919,7 @@ checksum = "4271d37baee1b8c7e4b708028c57d816cf9d2434acb33a549475f78c181f6253" [[package]] name = "git2" version = "0.18.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b3ba52851e73b46a4c3df1d89343741112003f0f6f13beb0dfac9e457c3fdcd" +source = "git+https://github.com/bnjmnt4n/git2-rs.git?rev=a0235c5#a0235c516fe9aac69aad17737d4817cb8c674b41" dependencies = [ "bitflags 2.4.2", "libc", @@ -1801,12 +1800,10 @@ checksum = "9c198f91728a82281a64e1f4f9eeb25d82cb32a5de251c6bd1b5154d63a8e7bd" [[package]] name = "libgit2-sys" version = "0.16.2+1.7.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ee4126d8b4ee5c9d9ea891dd875cfdc1e9d0950437179104b183d7d8a74d24e8" +source = "git+https://github.com/bnjmnt4n/git2-rs.git?rev=a0235c5#a0235c516fe9aac69aad17737d4817cb8c674b41" dependencies = [ "cc", "libc", - "libssh2-sys", "libz-sys", "openssl-sys", "pkg-config", @@ -1823,20 +1820,6 @@ dependencies = [ "redox_syscall", ] -[[package]] -name = "libssh2-sys" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2dc8a030b787e2119a731f1951d6a773e2280c660f8ec4b0f5e1505a386e71ee" -dependencies = [ - "cc", - "libc", - "libz-sys", - "openssl-sys", - "pkg-config", - "vcpkg", -] - [[package]] name = "libz-sys" version = "1.1.15" diff --git a/Cargo.toml b/Cargo.toml index 792de4f3fc..61ef974736 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -47,7 +47,7 @@ dirs = "5.0.1" either = "1.10.0" esl01-renderdag = "0.3.0" futures = "0.3.30" -git2 = "0.18.2" +git2 = { git = "https://github.com/bnjmnt4n/git2-rs.git", rev = "a0235c5", default-features = false, features = ["https", "ssh-openssh"] } gix = { version = "0.58.0", default-features = false, features = [ "index", "max-performance-safe", diff --git a/lib/src/git.rs b/lib/src/git.rs index e05a6987c5..cc0c4e6162 100644 --- a/lib/src/git.rs +++ b/lib/src/git.rs @@ -1149,7 +1149,12 @@ pub fn fetch( tracing::debug!("remote.prune"); remote.prune(None)?; tracing::debug!("remote.update_tips"); - remote.update_tips(None, false, git2::AutotagOption::Unspecified, None)?; + remote.update_tips( + None, + git2::RemoteUpdateFlags::empty(), + git2::AutotagOption::Unspecified, + None, + )?; // TODO: We could make it optional to get the default branch since we only care // about it on clone. let mut default_branch = None;