fn github_fast_path(
    repo: &mut Repository,
    url: &str,
    reference: &GitReference,
    config: &Config
) -> CargoResult<FastPathRev>
Expand description

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 a fast path available to use 1 to tell us that there’s no updates to be made.

This function will attempt to hit that fast path and verify that the oid is actually the current branch of the repository.

Note that this function should never cause an actual failure because it’s just a fast path. As a result all errors are ignored in this function and we just return a bool. Any real errors will be reported through the normal update path above.