From 01ad0615b23bcc23d4fe73f04c53886a12606a75 Mon Sep 17 00:00:00 2001 From: extrawurst <776816+extrawurst@users.noreply.github.com> Date: Fri, 10 Jan 2025 15:28:52 +0100 Subject: [PATCH] git2 upgrade (#2473) --- Cargo.lock | 8 ++++---- asyncgit/Cargo.toml | 2 +- asyncgit/src/lib.rs | 6 +++--- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 687db70de7..02e960bea7 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1119,9 +1119,9 @@ dependencies = [ [[package]] name = "git2" -version = "0.19.0" +version = "0.20.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b903b73e45dc0c6c596f2d37eccece7c1c8bb6e4407b001096387c63d0d93724" +checksum = "3fda788993cc341f69012feba8bf45c0ba4f3291fcc08e214b4d5a7332d88aff" dependencies = [ "bitflags 2.7.0", "libc", @@ -2183,9 +2183,9 @@ checksum = "b5aba8db14291edd000dfcc4d620c7ebfb122c613afb886ca8803fa4e128a20a" [[package]] name = "libgit2-sys" -version = "0.17.0+1.8.1" +version = "0.18.0+1.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "10472326a8a6477c3c20a64547b0059e4b0d086869eee31e6d7da728a8eb7224" +checksum = "e1a117465e7e1597e8febea8bb0c410f1c7fb93b1e1cddf34363f8390367ffec" dependencies = [ "cc", "libc", diff --git a/asyncgit/Cargo.toml b/asyncgit/Cargo.toml index d13aa15481..de492940de 100644 --- a/asyncgit/Cargo.toml +++ b/asyncgit/Cargo.toml @@ -17,7 +17,7 @@ crossbeam-channel = "0.5" dirs = "5.0" easy-cast = "0.5" fuzzy-matcher = "0.3" -git2 = "0.19" +git2 = "0.20" git2-hooks = { path = "../git2-hooks", version = ">=0.4" } gix = { version = "0.69.1", default-features = false, features = [ "max-performance", diff --git a/asyncgit/src/lib.rs b/asyncgit/src/lib.rs index 50b3d820f8..fa022e4020 100644 --- a/asyncgit/src/lib.rs +++ b/asyncgit/src/lib.rs @@ -129,10 +129,10 @@ pub fn hash(v: &T) -> u64 { /// #[cfg(feature = "trace-libgit")] pub fn register_tracing_logging() -> bool { - fn git_trace(level: git2::TraceLevel, msg: &str) { - log::info!("[{:?}]: {}", level, msg); + fn git_trace(level: git2::TraceLevel, msg: &[u8]) { + log::info!("[{:?}]: {}", level, String::from_utf8_lossy(msg)); } - git2::trace_set(git2::TraceLevel::Trace, git_trace) + git2::trace_set(git2::TraceLevel::Trace, git_trace).is_ok() } ///