Skip to content

Commit fa1b21c

Browse files
committed
upgrade to latest version of crates-index to remove git2
1 parent e200a56 commit fa1b21c

File tree

2 files changed

+10
-6
lines changed

2 files changed

+10
-6
lines changed

Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ http-reqwest = ["gix/blocking-http-transport-reqwest-rust-tls"]
3535

3636

3737
[dependencies]
38-
gix = { version = "0.48.0", default-features = false, features = ["max-performance-safe", "blocking-network-client" ] }
38+
gix = { version = "0.50.0", default-features = false, features = ["max-performance-safe", "blocking-network-client" ] }
3939
serde = { version = "1", features = ["std", "derive"] }
4040
hex = { version = "0.4.3", features = ["serde"] }
4141
smartstring = { version = "1.0.1", features = ["serde"] }
@@ -47,5 +47,5 @@ hashbrown = { version = "0.14.0", features = ["raw"] }
4747

4848
[dev-dependencies]
4949
gix-testtools = "0.12.0"
50-
crates-index = "0.19.10"
50+
crates-index = { version = "2.0.0", default-features = false, features = ["git-performance", "git-https"] }
5151
tempdir = "0.3.5"

tests/shared/mod.rs

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,10 @@ pub fn baseline(mode: Step) -> Result<(), Box<dyn std::error::Error + Send + Syn
2121
// likely happen, causing `git2` to fail with a lock on the config file. It's curious that it has to lock it
2222
// in the first place.
2323
{
24-
let _index = crates_index::Index::new_cargo_default()?;
24+
let _index = crates_index::GitIndex::new_cargo_default()?;
2525
}
2626
let baseline = scope.spawn(|| -> Result<_, crates_index::Error> {
27-
let index = crates_index::Index::new_cargo_default()?;
27+
let index = crates_index::GitIndex::new_cargo_default()?;
2828
let start = std::time::Instant::now();
2929
let mut versions = HashMap::new();
3030
for krate in index.crates() {
@@ -36,10 +36,14 @@ pub fn baseline(mode: Step) -> Result<(), Box<dyn std::error::Error + Send + Syn
3636
});
3737
let actual = scope.spawn(|| -> Result<_, Box<dyn std::error::Error + Send + Sync>> {
3838
let start = std::time::Instant::now();
39-
let repo_path = crates_index::Index::new_cargo_default()?.path().to_owned();
39+
let repo_path = crates_index::GitIndex::new_cargo_default()?
40+
.path()
41+
.to_owned();
4042
let index = crates_index_diff::Index::from_path_or_cloned(repo_path)?;
4143
let repo = index.repository();
42-
let head = repo.find_reference("refs/remotes/origin/HEAD")?.id();
44+
let head = repo
45+
.find_reference("refs/remotes/origin/HEAD")?
46+
.into_fully_peeled_id()?;
4347
let commits = head
4448
.ancestors()
4549
.first_parent_only()

0 commit comments

Comments
 (0)