Skip to content

Commit d61eb2c

Browse files
committed
adapt to changes in git-protocol (#450)
1 parent 42c977f commit d61eb2c

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

git-repository/src/clone/fetch/util.rs

+3-1
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,9 @@ pub fn update_head(
5656
git_protocol::fetch::Ref::Direct { full_ref_name, object } if full_ref_name == "HEAD" => {
5757
(Some(object), None)
5858
}
59-
git_protocol::fetch::Ref::Unborn { target } => (None, Some(target)),
59+
git_protocol::fetch::Ref::Unborn { full_ref_name, target } if full_ref_name == "HEAD" => {
60+
(None, Some(target))
61+
}
6062
_ => return None,
6163
})
6264
}) {

git-repository/src/remote/fetch.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,8 @@ impl Source {
5454
match self {
5555
Source::ObjectId(_) => None,
5656
Source::Ref(r) => match r {
57-
git_protocol::fetch::Ref::Unborn { target: _ } => Some("HEAD".into()),
58-
git_protocol::fetch::Ref::Symbolic { full_ref_name, .. }
57+
git_protocol::fetch::Ref::Unborn { full_ref_name, .. }
58+
| git_protocol::fetch::Ref::Symbolic { full_ref_name, .. }
5959
| git_protocol::fetch::Ref::Direct { full_ref_name, .. }
6060
| git_protocol::fetch::Ref::Peeled { full_ref_name, .. } => Some(full_ref_name.as_ref()),
6161
},

0 commit comments

Comments
 (0)