Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gix upgrade #151

Merged
merged 4 commits into from
Sep 25, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ name = "update_and_get_latest"
required-features = ["git-https"]

[dependencies]
gix = { version = "0.51.0", default-features = false, features = ["max-performance-safe", "blocking-network-client"], optional = true }
gix = { version = "0.54.1", default-features = false, features = ["max-performance-safe", "blocking-network-client"], optional = true }
hex = { version = "0.4.3", features = ["serde"] }
home = "0.5.4"
http = { version = "0.2", optional = true }
Expand All @@ -43,7 +43,7 @@ serde_derive = "1.0.160"
serde_json = "1.0.96"
smol_str = { version = "0.2.0", features = ["serde"] }
thiserror = "1.0.43"
toml = "0.7.3"
toml = "0.8.0"

document-features = { version = "0.2.0", optional = true }

Expand Down
3 changes: 2 additions & 1 deletion src/git/impl_.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
use crate::error::GixError;
use crate::git::{changes, config, URL};
use crate::{path_max_byte_len, Crate, Error, GitIndex, IndexConfig};
use gix::bstr::ByteSlice;
use gix::config::tree::Key;
use std::io;
use std::path::{Path, PathBuf};
Expand Down Expand Up @@ -174,7 +175,7 @@
repo.find_remote("origin").map_or(true, |remote| {
remote
.url(gix::remote::Direction::Fetch)
.map_or(false, |remote_url| remote_url.to_bstring() == url)
.map_or(false, |remote_url| remote_url.to_bstring().starts_with_str(&url))
})
});

Expand Down Expand Up @@ -519,7 +520,7 @@

enum MaybeOwned<'a, T> {
Owned(T),
Borrowed(&'a mut T),

Check warning on line 523 in src/git/impl_.rs

View workflow job for this annotation

GitHub Actions / Test (ubuntu-latest, stable)

variant `Borrowed` is never constructed

Check warning on line 523 in src/git/impl_.rs

View workflow job for this annotation

GitHub Actions / Test (windows-latest, stable)

variant `Borrowed` is never constructed

Check warning on line 523 in src/git/impl_.rs

View workflow job for this annotation

GitHub Actions / Test (ubuntu-latest, stable)

variant `Borrowed` is never constructed

Check warning on line 523 in src/git/impl_.rs

View workflow job for this annotation

GitHub Actions / Test (windows-latest, stable)

variant `Borrowed` is never constructed
}

/// Iterator over all crates in the index. Skips crates that failed to parse.
Expand Down
7 changes: 6 additions & 1 deletion tests/git/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,12 @@ pub(crate) mod with_https {

let index_path = "tests/fixtures/git-registry";
if is_ci::cached() {
GitIndex::new_cargo_default().expect("CI has just cloned this index and its ours and valid")
let index = GitIndex::new_cargo_default().expect("CI has just cloned this index and its ours and valid");
assert!(
GitIndex::try_new_cargo_default().unwrap().is_some(),
"index should exist if we just retrieved it"
);
index
} else {
GitIndex::with_path(index_path, URL).expect("clone works and there is no racing")
}
Expand Down
2 changes: 1 addition & 1 deletion tests/mem.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ mod mem {
peak = ByteSize(ALLOCATOR.max_allocated() as u64),
);
assert!(
per_crate < 6300,
per_crate < 6600,
"per crate limit {per_crate}B should remain below memory limit"
);
}
Expand Down
Loading