Skip to content

Commit

Permalink
adapt to changes in gix-refspec
Browse files Browse the repository at this point in the history
  • Loading branch information
Byron committed Jan 13, 2025
1 parent aa56128 commit 6d7dd9b
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion gix-protocol/src/fetch/refmap/init.rs
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ impl RefMap {
let num_explicit_specs = fetch_refspecs.len();
let group = gix_refspec::MatchGroup::from_fetch_specs(all_refspecs.iter().map(gix_refspec::RefSpec::to_ref));
let (res, fixes) = group
.match_remotes(remote_refs.iter().map(|r| {
.match_lhs(remote_refs.iter().map(|r| {
let (full_ref_name, target, object) = r.unpack();
gix_refspec::match_group::Item {
full_ref_name,
Expand Down
8 changes: 4 additions & 4 deletions gix/src/clone/fetch/util.rs
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ pub(super) fn find_custom_refname<'a>(
object: None,
})
.collect();
let res = group.match_remotes(filtered_items.iter().copied());
let res = group.match_lhs(filtered_items.iter().copied());
match res.mappings.len() {
0 => Err(Error::RefNameMissing {
wanted: ref_name.clone(),
Expand All @@ -221,9 +221,9 @@ pub(super) fn find_custom_refname<'a>(
wanted: ref_name.clone(),
candidates: res
.mappings
.iter()
.into_iter()
.filter_map(|m| match m.lhs {
gix_refspec::match_group::SourceRef::FullName(name) => Some(name.to_owned()),
gix_refspec::match_group::SourceRef::FullName(name) => Some(name.into_owned()),
gix_refspec::match_group::SourceRef::ObjectId(_) => None,
})
.collect(),
Expand Down Expand Up @@ -252,7 +252,7 @@ fn setup_branch_config(
.expect("remote was just created and must be visible in config");
let group = gix_refspec::MatchGroup::from_fetch_specs(remote.fetch_specs.iter().map(gix_refspec::RefSpec::to_ref));
let null = gix_hash::ObjectId::null(repo.object_hash());
let res = group.match_remotes(
let res = group.match_lhs(
Some(gix_refspec::match_group::Item {
full_ref_name: branch.as_bstr(),
target: branch_id.unwrap_or(&null),
Expand Down
2 changes: 1 addition & 1 deletion gix/src/remote/connection/fetch/update_refs/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -920,7 +920,7 @@ mod update {
let mut references: Vec<_> = references.all().unwrap().map(|r| into_remote_ref(r.unwrap())).collect();
references.push(into_remote_ref(remote_repo.find_reference("HEAD").unwrap()));
let mappings = group
.match_remotes(references.iter().map(remote_ref_to_item))
.match_lhs(references.iter().map(remote_ref_to_item))
.mappings
.into_iter()
.map(|m| fetch::refmap::Mapping {
Expand Down
2 changes: 1 addition & 1 deletion gix/src/repository/config/branch.rs
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ fn matching_remote<'a>(
.collect(),
};
let null_id = object_hash.null();
let out = search.match_remotes(
let out = search.match_lhs(
Some(gix_refspec::match_group::Item {
full_ref_name: lhs.as_bstr(),
target: &null_id,
Expand Down

0 comments on commit 6d7dd9b

Please sign in to comment.