Skip to content

Commit

Permalink
Update to libgit2 1.5.1
Browse files Browse the repository at this point in the history
  • Loading branch information
ehuss committed Jan 20, 2023
1 parent bce1555 commit a233483
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 6 deletions.
4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "git2"
version = "0.16.0"
version = "0.16.1"
authors = ["Josh Triplett <josh@joshtriplett.org>", "Alex Crichton <alex@alexcrichton.com>"]
license = "MIT OR Apache-2.0"
readme = "README.md"
Expand All @@ -20,7 +20,7 @@ url = "2.0"
bitflags = "1.1.0"
libc = "0.2"
log = "0.4.8"
libgit2-sys = { path = "libgit2-sys", version = "0.14.1" }
libgit2-sys = { path = "libgit2-sys", version = "0.14.2" }

[target."cfg(all(unix, not(target_os = \"macos\")))".dependencies]
openssl-sys = { version = "0.9.0", optional = true }
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ libgit2 bindings for Rust.

```toml
[dependencies]
git2 = "0.16"
git2 = "0.16.1"
```

## Rust version requirements
Expand Down
2 changes: 1 addition & 1 deletion libgit2-sys/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "libgit2-sys"
version = "0.14.1+1.5.0"
version = "0.14.2+1.5.1"
authors = ["Josh Triplett <josh@joshtriplett.org>", "Alex Crichton <alex@alexcrichton.com>"]
links = "git2"
build = "build.rs"
Expand Down
8 changes: 7 additions & 1 deletion libgit2-sys/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,13 @@ fn main() {
let try_to_use_system_libgit2 = !vendored && !zlib_ng_compat;
if try_to_use_system_libgit2 {
let mut cfg = pkg_config::Config::new();
if let Ok(lib) = cfg.range_version("1.4.4".."1.6.0").probe("libgit2") {
// These version ranges specifically request a version that includes
// the SSH fixes for CVE-2023-22742 (1.5.1+ or 1.4.5+).
if let Ok(lib) = cfg
.range_version("1.5.1".."1.6.0")
.probe("libgit2")
.or_else(|_| cfg.range_version("1.4.5".."1.5.0").probe("libgit2"))
{
for include in &lib.include_paths {
println!("cargo:root={}", include.display());
}
Expand Down
2 changes: 1 addition & 1 deletion libgit2-sys/libgit2

0 comments on commit a233483

Please sign in to comment.