We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
.git
1 parent 869642b commit 437e5d7Copy full SHA for 437e5d7
src/cargo/sources/git/utils.rs
@@ -989,6 +989,14 @@ fn github_up_to_date(
989
anyhow::bail!("too many segments on URL");
990
}
991
992
+ // Trim off the `.git` from the repository, if present, since that's
993
+ // optional for GitHub and won't work when we try to use the API as well.
994
+ let repository = if repository.ends_with(".git") {
995
+ &repository[..repository.len() - 4]
996
+ } else {
997
+ repository
998
+ };
999
+
1000
let url = format!(
1001
"https://api.github.com/repos/{}/{}/commits/{}",
1002
username, repository, github_branch_name,
0 commit comments