Skip to content

Commit 66e6834

Browse files
committed
adapt to changes in gix-refspec
1 parent 7e12f89 commit 66e6834

File tree

4 files changed

+7
-7
lines changed

4 files changed

+7
-7
lines changed

gix-protocol/src/fetch/refmap/init.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ impl RefMap {
110110
let num_explicit_specs = fetch_refspecs.len();
111111
let group = gix_refspec::MatchGroup::from_fetch_specs(all_refspecs.iter().map(gix_refspec::RefSpec::to_ref));
112112
let (res, fixes) = group
113-
.match_remotes(remote_refs.iter().map(|r| {
113+
.match_lhs(remote_refs.iter().map(|r| {
114114
let (full_ref_name, target, object) = r.unpack();
115115
gix_refspec::match_group::Item {
116116
full_ref_name,

gix/src/clone/fetch/util.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,7 @@ pub(super) fn find_custom_refname<'a>(
206206
object: None,
207207
})
208208
.collect();
209-
let res = group.match_remotes(filtered_items.iter().copied());
209+
let res = group.match_lhs(filtered_items.iter().copied());
210210
match res.mappings.len() {
211211
0 => Err(Error::RefNameMissing {
212212
wanted: ref_name.clone(),
@@ -221,9 +221,9 @@ pub(super) fn find_custom_refname<'a>(
221221
wanted: ref_name.clone(),
222222
candidates: res
223223
.mappings
224-
.iter()
224+
.into_iter()
225225
.filter_map(|m| match m.lhs {
226-
gix_refspec::match_group::SourceRef::FullName(name) => Some(name.to_owned()),
226+
gix_refspec::match_group::SourceRef::FullName(name) => Some(name.into_owned()),
227227
gix_refspec::match_group::SourceRef::ObjectId(_) => None,
228228
})
229229
.collect(),
@@ -252,7 +252,7 @@ fn setup_branch_config(
252252
.expect("remote was just created and must be visible in config");
253253
let group = gix_refspec::MatchGroup::from_fetch_specs(remote.fetch_specs.iter().map(gix_refspec::RefSpec::to_ref));
254254
let null = gix_hash::ObjectId::null(repo.object_hash());
255-
let res = group.match_remotes(
255+
let res = group.match_lhs(
256256
Some(gix_refspec::match_group::Item {
257257
full_ref_name: branch.as_bstr(),
258258
target: branch_id.unwrap_or(&null),

gix/src/remote/connection/fetch/update_refs/tests.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -920,7 +920,7 @@ mod update {
920920
let mut references: Vec<_> = references.all().unwrap().map(|r| into_remote_ref(r.unwrap())).collect();
921921
references.push(into_remote_ref(remote_repo.find_reference("HEAD").unwrap()));
922922
let mappings = group
923-
.match_remotes(references.iter().map(remote_ref_to_item))
923+
.match_lhs(references.iter().map(remote_ref_to_item))
924924
.mappings
925925
.into_iter()
926926
.map(|m| fetch::refmap::Mapping {

gix/src/repository/config/branch.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,7 @@ fn matching_remote<'a>(
196196
.collect(),
197197
};
198198
let null_id = object_hash.null();
199-
let out = search.match_remotes(
199+
let out = search.match_lhs(
200200
Some(gix_refspec::match_group::Item {
201201
full_ref_name: lhs.as_bstr(),
202202
target: &null_id,

0 commit comments

Comments
 (0)