Skip to content

Commit cb39fcb

Browse files
committed
adapt to changes in gix-protocol
1 parent 151cbe1 commit cb39fcb

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

gitoxide-core/src/pack/receive.rs

+4-1
Original file line numberDiff line numberDiff line change
@@ -140,10 +140,13 @@ impl gix::protocol::fetch::Negotiate for Negotiate<'_> {
140140
})
141141
}
142142

143-
fn add_wants(&mut self, arguments: &mut Arguments, _remote_ref_target_known: &[bool]) {
143+
fn add_wants(&mut self, arguments: &mut Arguments, _remote_ref_target_known: &[bool]) -> bool {
144+
let mut has_want = false;
144145
for id in self.refmap.mappings.iter().filter_map(|m| m.remote.as_id()) {
145146
arguments.want(id);
147+
has_want = true;
146148
}
149+
has_want
147150
}
148151

149152
fn one_round(

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

+2-2
Original file line numberDiff line numberDiff line change
@@ -274,15 +274,15 @@ impl gix_protocol::fetch::Negotiate for Negotiate<'_, '_, '_> {
274274
)
275275
}
276276

277-
fn add_wants(&mut self, arguments: &mut Arguments, remote_ref_target_known: &[bool]) {
277+
fn add_wants(&mut self, arguments: &mut Arguments, remote_ref_target_known: &[bool]) -> bool {
278278
negotiate::add_wants(
279279
self.objects,
280280
arguments,
281281
self.ref_map,
282282
remote_ref_target_known,
283283
self.shallow,
284284
negotiate::make_refmapping_ignore_predicate(self.tags, self.ref_map),
285-
);
285+
)
286286
}
287287

288288
fn one_round(

0 commit comments

Comments
 (0)