Skip to content

Commit

Permalink
Auto merge of rust-lang#5381 - dwijnand:github-casing, r=alexcrichton
Browse files Browse the repository at this point in the history
Fix how GitHub is written

just a silly PR - I noticed it in the README, and applied it repo-wide.
  • Loading branch information
bors committed Apr 18, 2018
2 parents ae41c6c + 43914c5 commit 3231fd3
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion src/cargo/sources/git/source.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
8 changes: 4 additions & 4 deletions src/cargo/sources/git/utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -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.
///
Expand All @@ -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());
Expand Down

0 comments on commit 3231fd3

Please sign in to comment.