Skip to content

Commit 1fdaf71

Browse files
committed
adapt to changes in gix-revision/gix-revwalk
1 parent f4b0195 commit 1fdaf71

File tree

4 files changed

+9
-7
lines changed

4 files changed

+9
-7
lines changed

gix-negotiate/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ test = false
1515
[dependencies]
1616
gix-hash = { version = "^0.11.2", path = "../gix-hash" }
1717
gix-object = { version = "^0.30.0", path = "../gix-object" }
18+
gix-date = { version = "^0.5.1", path = "../gix-date" }
1819
gix-commitgraph = { version = "^0.16.0", path = "../gix-commitgraph" }
1920
gix-revision = { version = "^0.15.2", path = "../gix-revision" }
2021
thiserror = "1.0.40"

gix-negotiate/src/consecutive.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1+
use gix_date::SecondsSinceUnixEpoch;
12
use gix_hash::ObjectId;
2-
use gix_revision::graph::CommitterTimestamp;
33

44
use crate::{Error, Flags, Negotiator};
55

66
pub(crate) struct Algorithm {
7-
revs: gix_revision::PriorityQueue<CommitterTimestamp, ObjectId>,
7+
revs: gix_revision::PriorityQueue<SecondsSinceUnixEpoch, ObjectId>,
88
non_common_revs: usize,
99
}
1010

gix-negotiate/src/skipping.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1+
use gix_date::SecondsSinceUnixEpoch;
12
use gix_hash::ObjectId;
2-
use gix_revision::graph::CommitterTimestamp;
33

44
use crate::{Error, Flags, Metadata, Negotiator};
55

66
pub(crate) struct Algorithm {
7-
revs: gix_revision::PriorityQueue<CommitterTimestamp, ObjectId>,
7+
revs: gix_revision::PriorityQueue<SecondsSinceUnixEpoch, ObjectId>,
88
non_common_revs: usize,
99
}
1010

gix/src/remote/connection/fetch/negotiate.rs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
use gix_date::SecondsSinceUnixEpoch;
12
use std::borrow::Cow;
23

34
use gix_negotiate::Flags;
@@ -6,7 +7,7 @@ use gix_pack::Find;
67

78
use crate::remote::{fetch, fetch::Shallow};
89

9-
type Queue = gix_revision::PriorityQueue<gix_revision::graph::CommitterTimestamp, gix_hash::ObjectId>;
10+
type Queue = gix_revision::PriorityQueue<SecondsSinceUnixEpoch, gix_hash::ObjectId>;
1011

1112
/// The error returned during negotiation.
1213
#[derive(Debug, thiserror::Error)]
@@ -85,7 +86,7 @@ pub(crate) fn mark_complete_and_common_ref(
8586

8687
// Compute the cut-off date by checking which of the refs advertised (and matched in refspecs) by the remote we have,
8788
// and keep the oldest one.
88-
let mut cutoff_date = None::<gix_revision::graph::CommitterTimestamp>;
89+
let mut cutoff_date = None::<SecondsSinceUnixEpoch>;
8990
let mut num_mappings_with_change = 0;
9091
let mut remote_ref_target_known: Vec<bool> = std::iter::repeat(false).take(ref_map.mappings.len()).collect();
9192

@@ -228,7 +229,7 @@ pub(crate) fn add_wants(
228229
fn mark_recent_complete_commits(
229230
queue: &mut Queue,
230231
graph: &mut gix_negotiate::Graph<'_>,
231-
cutoff: gix_revision::graph::CommitterTimestamp,
232+
cutoff: SecondsSinceUnixEpoch,
232233
) -> Result<(), Error> {
233234
while let Some(id) = queue
234235
.peek()

0 commit comments

Comments
 (0)