Skip to content

Commit

Permalink
adapt to changes in git-protocol (#450)
Browse files Browse the repository at this point in the history
  • Loading branch information
Byron committed Nov 2, 2022
1 parent 42c977f commit d61eb2c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
4 changes: 3 additions & 1 deletion git-repository/src/clone/fetch/util.rs
Expand Up @@ -56,7 +56,9 @@ pub fn update_head(
git_protocol::fetch::Ref::Direct { full_ref_name, object } if full_ref_name == "HEAD" => {
(Some(object), None)
}
git_protocol::fetch::Ref::Unborn { target } => (None, Some(target)),
git_protocol::fetch::Ref::Unborn { full_ref_name, target } if full_ref_name == "HEAD" => {
(None, Some(target))
}
_ => return None,
})
}) {
Expand Down
4 changes: 2 additions & 2 deletions git-repository/src/remote/fetch.rs
Expand Up @@ -54,8 +54,8 @@ impl Source {
match self {
Source::ObjectId(_) => None,
Source::Ref(r) => match r {
git_protocol::fetch::Ref::Unborn { target: _ } => Some("HEAD".into()),
git_protocol::fetch::Ref::Symbolic { full_ref_name, .. }
git_protocol::fetch::Ref::Unborn { full_ref_name, .. }
| git_protocol::fetch::Ref::Symbolic { full_ref_name, .. }
| git_protocol::fetch::Ref::Direct { full_ref_name, .. }
| git_protocol::fetch::Ref::Peeled { full_ref_name, .. } => Some(full_ref_name.as_ref()),
},
Expand Down

0 comments on commit d61eb2c

Please sign in to comment.