mirror of https://github.com/rust-lang/cargo
Auto merge of #5381 - dwijnand:github-casing, r=alexcrichton
Fix how GitHub is written just a silly PR - I noticed it in the README, and applied it repo-wide.
This commit is contained in:
commit
3231fd3e65
|
@ -59,7 +59,7 @@ Cargo releases coincide with Rust releases.
|
|||
|
||||
Found a bug? We'd love to know about it!
|
||||
|
||||
Please report all issues on the github [issue tracker][issues].
|
||||
Please report all issues on the GitHub [issue tracker][issues].
|
||||
|
||||
[issues]: https://github.com/rust-lang/cargo/issues
|
||||
|
||||
|
|
|
@ -89,7 +89,7 @@ pub fn canonicalize_url(url: &Url) -> CargoResult<Url> {
|
|||
url.path_segments_mut().unwrap().pop_if_empty();
|
||||
}
|
||||
|
||||
// HACKHACK: For github URL's specifically just lowercase
|
||||
// HACKHACK: For GitHub URL's specifically just lowercase
|
||||
// everything. GitHub treats both the same, but they hash
|
||||
// differently, and we're gonna be hashing them. This wants a more
|
||||
// general solution, and also we're almost certainly not using the
|
||||
|
|
|
@ -671,12 +671,12 @@ pub fn fetch(
|
|||
bail!("can't update a git repository in the offline mode")
|
||||
}
|
||||
|
||||
// If we're fetching from github, attempt github's special fast path for
|
||||
// If we're fetching from GitHub, attempt GitHub's special fast path for
|
||||
// testing if we've already got an up-to-date copy of the repository
|
||||
if url.host_str() == Some("github.com") {
|
||||
if let Ok(oid) = repo.refname_to_id("refs/remotes/origin/master") {
|
||||
let mut handle = config.http()?.borrow_mut();
|
||||
debug!("attempting github fast path for {}", url);
|
||||
debug!("attempting GitHub fast path for {}", url);
|
||||
if github_up_to_date(&mut handle, url, &oid) {
|
||||
return Ok(());
|
||||
} else {
|
||||
|
@ -821,7 +821,7 @@ fn reinitialize(repo: &mut git2::Repository) -> CargoResult<()> {
|
|||
}
|
||||
|
||||
/// Updating the index is done pretty regularly so we want it to be as fast as
|
||||
/// possible. For registries hosted on github (like the crates.io index) there's
|
||||
/// possible. For registries hosted on GitHub (like the crates.io index) there's
|
||||
/// a fast path available to use [1] to tell us that there's no updates to be
|
||||
/// made.
|
||||
///
|
||||
|
@ -844,7 +844,7 @@ fn github_up_to_date(handle: &mut Easy, url: &Url, oid: &git2::Oid) -> bool {
|
|||
})
|
||||
}
|
||||
|
||||
// This expects github urls in the form `github.com/user/repo` and nothing
|
||||
// This expects GitHub urls in the form `github.com/user/repo` and nothing
|
||||
// else
|
||||
let mut pieces = try!(url.path_segments());
|
||||
let username = try!(pieces.next());
|
||||
|
|
Loading…
Reference in New Issue