-
Notifications
You must be signed in to change notification settings - Fork 2.6k
bump git2 dependencies #7706
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
bump git2 dependencies #7706
Conversation
r? @Eh2406 (rust_highfive has picked a reviewer for you, use r? to override) |
Ci seems unhappy. |
crates/cargo-test-support/src/git.rs
Outdated
@@ -197,7 +197,7 @@ pub fn add_submodule<'a>( | |||
default_repo_cfg(&subrepo); | |||
t!(subrepo.remote_add_fetch("origin", "refs/heads/*:refs/heads/*")); | |||
let mut origin = t!(subrepo.find_remote("origin")); | |||
t!(origin.fetch(&[], None, None)); | |||
t!(origin.fetch(&[&String::new()], None, None)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you explain why this change is needed? The docs still say an empty array is OK.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, I see, it is due to rust-lang/git2-rs#482. Perhaps it could use a cast instead?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes I believe this is the cause of the broken CI as well, and agree that this should use an explicit cast and/or type parameter to convince the build it should work.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah looks like I broke the tests by having none-empty vectors, silly me...
Using &Vec::<String>::new()
instead of &[&String::new()]
seems to work.
d3c837d
to
8245e02
Compare
Ci is green so: |
📌 Commit 8245e02 has been approved by |
bump git2 dependencies This required some manual code changes which dependabot could not perform.
@@ -1201,7 +1201,7 @@ fn dep_with_changed_submodule() { | |||
.remote_set_url("origin", &git_project3.url().to_string()) | |||
.unwrap(); | |||
let mut origin = subrepo.find_remote("origin").unwrap(); | |||
origin.fetch(&[], None, None).unwrap(); | |||
origin.fetch(&Vec::<String>::new(), None, None).unwrap(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
origin.fetch(&Vec::<String>::new(), None, None).unwrap(); | |
origin.fetch(&[] as &[&str], None, None).unwrap(); |
@@ -197,7 +197,7 @@ pub fn add_submodule<'a>( | |||
default_repo_cfg(&subrepo); | |||
t!(subrepo.remote_add_fetch("origin", "refs/heads/*:refs/heads/*")); | |||
let mut origin = t!(subrepo.find_remote("origin")); | |||
t!(origin.fetch(&[], None, None)); | |||
t!(origin.fetch(&Vec::<String>::new(), None, None)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
t!(origin.fetch(&Vec::<String>::new(), None, None)); | |
t!(origin.fetch(&[] as &[&str], None, None)); |
☀️ Test successful - checks-azure |
This required some manual code changes which dependabot could not perform.