Skip to content

Commit f726287

Browse files
committed
chore!: upgrade to gix v0.47 (from v0.45).
This includes integration with gix negotiation algorithms and support for multi-round negotiation just like git does it.
1 parent 892561a commit f726287

File tree

3 files changed

+7
-9
lines changed

3 files changed

+7
-9
lines changed

Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ required-features = ["max-performance"]
2121

2222
[[test]]
2323
name = "baseline-atomic"
24-
path = "tests/baseline_atomic.rs.rs"
24+
path = "tests/baseline_atomic.rs"
2525
required-features = ["max-performance"]
2626

2727
[features]
@@ -35,7 +35,7 @@ http-reqwest = ["gix/blocking-http-transport-reqwest-rust-tls"]
3535

3636

3737
[dependencies]
38-
gix = { version = "0.45.1", default-features = false, features = ["max-performance-safe", "blocking-network-client" ] }
38+
gix = { version = "0.47.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"] }

src/index/diff/mod.rs

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -279,7 +279,7 @@ impl Index {
279279
ancestor_commit: gix::hash::ObjectId,
280280
current_commit: gix::hash::ObjectId,
281281
) -> Option<Vec<gix::hash::ObjectId>> {
282-
let time_in_seconds_since_epoch = ancestor_commit
282+
let seconds = ancestor_commit
283283
.attach(&self.repo)
284284
.object()
285285
.ok()?
@@ -288,19 +288,17 @@ impl Index {
288288
.committer()
289289
.ok()?
290290
.time
291-
.seconds_since_unix_epoch;
291+
.seconds;
292292
let mut commits = current_commit
293293
.attach(&self.repo)
294294
.ancestors()
295295
.sorting(
296-
gix::traverse::commit::Sorting::ByCommitTimeNewestFirstCutoffOlderThan {
297-
time_in_seconds_since_epoch,
298-
},
296+
gix::traverse::commit::Sorting::ByCommitTimeNewestFirstCutoffOlderThan { seconds },
299297
)
300298
.first_parent_only()
301299
.all()
302300
.ok()?
303-
.map(|c| c.map(|c| c.detach()))
301+
.map(|c| c.map(|c| c.id))
304302
.collect::<Result<Vec<_>, _>>()
305303
.ok()?;
306304

tests/shared/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ pub fn baseline(mode: Step) -> Result<(), Box<dyn std::error::Error + Send + Syn
8484
for (step, (current, kind)) in steps
8585
.into_iter()
8686
.rev()
87-
.map(|(idx, kind)| (commits[idx].to_owned(), kind))
87+
.map(|(idx, kind)| (commits[idx].id, kind))
8888
.enumerate()
8989
{
9090
let old = previous

0 commit comments

Comments
 (0)