mirror of
https://github.com/deps-rs/deps.rs.git
synced 2024-11-22 18:36:30 +00:00
change master -> HEAD
This commit is contained in:
parent
b8a0fc7a8b
commit
c5d53d7f2c
1 changed files with 2 additions and 2 deletions
|
@ -8,14 +8,14 @@ const GITLAB_USER_CONTENT_BASE_URI: &'static str = "https://gitlab.com";
|
||||||
|
|
||||||
pub fn get_manifest_uri(repo_path: &RepoPath, path: &RelativePathBuf) -> Result<Uri, Error> {
|
pub fn get_manifest_uri(repo_path: &RepoPath, path: &RelativePathBuf) -> Result<Uri, Error> {
|
||||||
let path_str: &str = path.as_ref();
|
let path_str: &str = path.as_ref();
|
||||||
// gitlab will return a 308 if the Uri ends with, say, `.../raw/master//Cargo.toml`, so make
|
// gitlab will return a 308 if the Uri ends with, say, `.../raw/HEAD//Cargo.toml`, so make
|
||||||
// sure that last slash isn't doubled
|
// sure that last slash isn't doubled
|
||||||
let slash_path = if path_str.starts_with("/") {
|
let slash_path = if path_str.starts_with("/") {
|
||||||
&path_str[1..]
|
&path_str[1..]
|
||||||
} else {
|
} else {
|
||||||
path_str
|
path_str
|
||||||
};
|
};
|
||||||
Ok(format!("{}/{}/{}/raw/master/{}",
|
Ok(format!("{}/{}/{}/raw/HEAD/{}",
|
||||||
GITLAB_USER_CONTENT_BASE_URI,
|
GITLAB_USER_CONTENT_BASE_URI,
|
||||||
repo_path.qual.as_ref(),
|
repo_path.qual.as_ref(),
|
||||||
repo_path.name.as_ref(),
|
repo_path.name.as_ref(),
|
||||||
|
|
Loading…
Reference in a new issue